From f9f56cdee42a9ffb5e8faacba3f4aadf2b20b6ce Mon Sep 17 00:00:00 2001 From: Gleb Bahmutov Date: Wed, 5 Feb 2020 09:07:33 -0500 Subject: [PATCH] evaluated bundled code --- test/e2e/e2e_spec.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/e2e/e2e_spec.js b/test/e2e/e2e_spec.js index 9cc5441..8f32bce 100644 --- a/test/e2e/e2e_spec.js +++ b/test/e2e/e2e_spec.js @@ -1,9 +1,13 @@ +const chai = require('chai') const path = require('path') const snapshot = require('snap-shot-it') const fs = require('../../fs') const preprocessor = require('../../index') +/* eslint-disable-next-line no-unused-vars */ +const expect = chai.expect + beforeEach(function () { fs.removeSync(path.join(__dirname, '_test-output')) }) @@ -31,6 +35,8 @@ describe('imports and exports', () => { // do not generate source maps return bundle('math_spec.js', { browserifyOptions: { debug: false } }).then((output) => { snapshot('math default exports', output) + // now check that bundled tests work + eval(output) }) }) })