Skip to content

Commit

Permalink
Integrate sinon's assertion API into QUnit
Browse files Browse the repository at this point in the history
Fixes issue elwayman02#222 

This is a big win as sinon's assertion API is far superior, more readable, and offers better messaging then doing so manually.
  • Loading branch information
sukima authored Sep 11, 2019
1 parent 0492d1b commit 97a8105
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions addon-test-support/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { createSandbox, restoreSandbox } from './sinon-sandbox';
import { commonConfig } from '../utils/config';
let initializedCommonConfig;

/**
* Allows for creating and restoring a global sinon sandbox per test. This is
Expand All @@ -9,6 +11,10 @@ import { createSandbox, restoreSandbox } from './sinon-sandbox';
* @public
*/
export default function setupSinon(testEnvironment = self.QUnit) {
if (!initializedCommonConfig) {
initializedCommonConfig = true;
commonConfig();
}
testEnvironment.testStart(createSandbox);
testEnvironment.testDone(restoreSandbox);
}

0 comments on commit 97a8105

Please sign in to comment.