Assert stack trace location

This commit is contained in:
Kevin Sawicki
2015-02-19 14:53:15 -08:00
parent 05ffaec2ac
commit ebefc3b36d

View File

@@ -47,11 +47,13 @@ describe "Task", ->
it "reports deprecations in tasks", ->
jasmine.snapshotDeprecations()
task = new Task(require.resolve('./fixtures/task-handler-with-deprecations'))
handlerPath = require.resolve('./fixtures/task-handler-with-deprecations')
task = new Task(handlerPath)
waitsFor (done) -> task.start(done)
runs ->
deprecations = Grim.getDeprecations()
expect(deprecations.length).toBe 1
expect(deprecations[0].getStacks()[0][1].fileName).toBe handlerPath
jasmine.restoreDeprecationsSnapshot()