to5 -> babel

This commit is contained in:
Kevin Sawicki 2015-02-20 15:24:21 -08:00
parent 7ca9e5614c
commit 631c95643d

View File

@ -10,19 +10,19 @@ describe "Compile Cache", ->
it "adds the path to the correct CSON, CoffeeScript, or babel cache", ->
spyOn(CSON, 'readFileSync').andCallThrough()
spyOn(CoffeeCache, 'addPathToCache').andCallThrough()
spyOn(to5, 'addPathToCache').andCallThrough()
spyOn(babel, 'addPathToCache').andCallThrough()
CompileCache.addPathToCache(path.join(__dirname, 'fixtures', 'cson.cson'))
expect(CSON.readFileSync.callCount).toBe 1
expect(CoffeeCache.addPathToCache.callCount).toBe 0
expect(to5.addPathToCache.callCount).toBe 0
expect(babel.addPathToCache.callCount).toBe 0
CompileCache.addPathToCache(path.join(__dirname, 'fixtures', 'coffee.coffee'))
expect(CSON.readFileSync.callCount).toBe 1
expect(CoffeeCache.addPathToCache.callCount).toBe 1
expect(to5.addPathToCache.callCount).toBe 0
expect(babel.addPathToCache.callCount).toBe 0
CompileCache.addPathToCache(path.join(__dirname, 'fixtures', 'babel', 'double-quotes.js'))
expect(CSON.readFileSync.callCount).toBe 1
expect(CoffeeCache.addPathToCache.callCount).toBe 1
expect(to5.addPathToCache.callCount).toBe 1
expect(babel.addPathToCache.callCount).toBe 1