Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
18 lines (15 sloc) 644 Bytes
Janitor = require 'janitor'
BrowserBundler = require '../.'
path = require 'path'
module.exports = class BundleTest extends Janitor.TestCase
'test bundling': ->
bundle_path = path.join __dirname, 'fixtures', 'simple-package'
bundle = BrowserBundler.bundle bundle_path
result_in_closure = -> eval bundle.toString()
result_in_closure.call context = {}
main = context.require './main'
@assertEqual 'Rasmus', main.name
'test passing options correctly': ->
bundle_path = path.join __dirname, 'fixtures', 'simple-package'
bundle = BrowserBundler.bundle bundle_path, test: true
@assert bundle.options?.test
Something went wrong with that request. Please try again.