Skip to content

Commit

Permalink
Update compiler test for the new API
Browse files Browse the repository at this point in the history
  • Loading branch information
axic committed Dec 21, 2016
1 parent 5d2212c commit 48d8dcb
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions test/compiler-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,14 @@
var test = require('tape')

var Compiler = require('../src/app/compiler')
var EventManager = require('../src/lib/eventManager')

test('compiler.compile smoke', function (t) {
t.plan(1)

var noop = function () {}
var getCacheFile = function () { return 'fakeCacheFile' }
var fakeEditor = {onChangeSetup: noop, clearAnnotations: noop, getValue: noop, setCacheFileContent: noop, getCacheFile: getCacheFile}
var fakeQueryParams = {get: function () { return {} }}
var compiler = new Compiler(fakeEditor, fakeQueryParams, null, null, new EventManager())
var fakeImport = function (url, cb) { cb('Not implemented') }
var compiler = new Compiler(fakeImport)
compiler.setCompileJSON(noop)
compiler.compile()
compiler.compile({ 'test': '' }, 'test')
t.ok(compiler)
})

0 comments on commit 48d8dcb

Please sign in to comment.