Open jme783 opened 9 years ago
Not at the moment, but I'm sure it wouldn't be too hard to switch up insert-cassette to make it happen.
I've gotten it working with the following as a replacement for insert-cassette:
// mocha-insert-cassette.js
import {
startServer,
stopServer,
setupServer
} from './fake-server';
import betamaxRecorder from './betamax-recorder';
export default function(cassette){
beforeEach(function(){
startServer();
// if record is not selected, use recordings
if (!window.recordCassette){
setupServer(cassette);
}
betamaxRecorder.setup();
});
afterEach(function(){
stopServer();
// if we are not in testem, download new casettes.
if (window.recordCassette){
betamaxRecorder.download();
}
});
}
// change import line in test-helper to "import insertCassette from './helpers/mocha-insert-cassette';"
In our web UI for the mocha runner, we have added an option to toggle window.recordCassette.
Does this work with Mocha instead of Qunit?