Handle non-deterministic tests in Intern.js

describe('...', () => {
it('is a good, deterministic test case', () => {...});
it('[quarantine] is a non-deterministic one', () => {...});
});
const argv = require('yargs').argv;// By default, only runs tests that have no "[quarantine]"
// in their names
const grep = new RegExp('^(?!.*?\\[quarantine\\])');
// Runs the tests in the quarantine only
if (args.quarantine) {
grep = /\[quarantine\]/;
}
define({
<...>, // other options
grep: grep,
});

--

--

--

I think one of the most important thing in our life is curiosity. Stay curious, understand truly how things work and become a master craftsman. This is my goal.

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Levente Balogh

Levente Balogh

I think one of the most important thing in our life is curiosity. Stay curious, understand truly how things work and become a master craftsman. This is my goal.

More from Medium

Architecture of Chrome Extension

Document Object Model (DOM)

3 Lessons Learned from Using Playwright for UI Tests