Skip to content

Commit

Permalink
Add test to verify named exports
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisguttandin committed Jun 10, 2018
1 parent f70ff62 commit fc4b068
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test/es2015/check-esm-bundle-is-runnable.js
Expand Up @@ -7,13 +7,18 @@ const port = 3876;

const htmlWithModuleScript = `
<script type="module">
import sinon from '/sinon-esm.js';
import sinon, { spy } from '/sinon-esm.js';
const assert = (result) => { if(!result) throw new Error("Failed test"); };
try {
const stub = sinon.stub().returns(42);
assert(42 === stub());
const calledSpy = spy();
calledSpy();
assert(1 === calledSpy.callCount);
console.log('sinon-result:works');
} catch(err) {
console.log('sinon-result:fails Assertion incorrect' );
Expand Down

0 comments on commit fc4b068

Please sign in to comment.