pulsar/spec/typescript-spec.coffee
Max Brunsfeld 49e37f5410 Use source-map-support to handle stack trace conversion
Previously, our Error.convertStackTrace function was provided by coffeestack,
which only works for coffee-script. This adds a dependency on 'source-map-support',
which works for any source file with inline source maps.

This also refactors the code for registering our compilers (coffee-script,
typescript, and babel) so that caching logic is shared.
2015-08-19 17:55:29 -07:00

10 lines
377 B
CoffeeScript

describe "TypeScript transpiler support", ->
describe "when there is a .ts file", ->
it "transpiles it using typescript", ->
transpiled = require('./fixtures/typescript/valid.ts')
expect(transpiled(3)).toBe 4
describe "when the .ts file is invalid", ->
it "does not transpile", ->
expect(-> require('./fixtures/typescript/invalid.ts')).toThrow()