To test that an object was constructed by a given constructor function, use jasmine.any(Klass): describe('plus()', function() { it ('returns...

Browsers come with a set of built-in elements like or . When we need a new component not covered by...

matthewphillips.info

A while ago I tweeted a thread about how a small JavaScript snippet, one that can fit in a single...

api.rubyonrails.org

ActiveSupport (since 4.1) includes test helpers to manipulate time, just like the Timecop gem: To travel a relative amount of...

This is a bookmarklet you can add to Chrome or Firefox which will allow you to create a story in...

jQuery is still a useful and pragmatic library, but chances are increasingly that you’re not dependent on using it...

Capybara provides execute_script and evaluate_script to execute JavaScript code in a Selenium-controlled browser. This however is not...

makandra dev

CSS transitions are a simple animation framework that is built right into browsers. No need for Javascript here. They're...

Rails is split into a large number of (sub-) frameworks. The most important and central of those are activesupport (extends...

makandra dev

General hints on the DOM the root of the DOM is document custom elements inherit from HTMLElement. They need a...

When an AJAX request raises an exception on the server, Rails will show a minimal error page with only basic...

makandra dev

webpack is a very powerful asset bundler written in node.js to bundle (ES6) JavaScript modules, stylesheets, images, and other assets...

RubyMine comes with a nice way to grep through your project's files: The finder (ctrl + shift + f). Don't...

The goal is to get Jasmine specs running in a Rails project using Webpacker, with the browser based test runner...

In Ruby on Rails, all objects have a useful blank? method. It returns true for nil but also for empty...

It is quite easy to migrate from CoffeeScript to ES6. You can use decaffeinate to convert your CoffeeScript source to...

Over the years we have tried several solution to have vector icons in our applications. There are many ways to...

To keep JavaScript sources small, it can sometimes make sense to split your webpack bundles. For example, if your website...

Download buttons can be difficult to test, especially with Selenium. Depending on browser, user settings and response headers, one of...

We're always striving towards keeping our website's JavaScript as small as possible. If you're using webpack(er...

makandra dev

TL;DR Most web applications do not require action on this. SameSite=None (old browser default) will continue to work...

To avoid multiple versions of a package, you can manually maintain a resolutions section in your package.json. We recommend you...

This is a short overview of things that are required to upgrade a project from the Asset Pipeline to Webpacker...