Skip to content
This repository has been archived by the owner on Jan 31, 2023. It is now read-only.

Commit

Permalink
evaluated bundled code
Browse files Browse the repository at this point in the history
  • Loading branch information
bahmutov committed Feb 5, 2020
1 parent bd1724f commit f9f56cd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions 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'))
})
Expand Down Expand Up @@ -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)
})
})
})

0 comments on commit f9f56cd

Please sign in to comment.