Browse Source

Add spec for registering/requiring Coffeescript

Kevin Sawicki 8 years ago
parent
commit
84f8bfbdef
2 changed files with 10 additions and 0 deletions
  1. 1 0
      spec/fixtures/module/test.coffee
  2. 9 0
      spec/modules-spec.js

+ 1 - 0
spec/fixtures/module/test.coffee

@@ -0,0 +1 @@
+module.exports = yes

+ 9 - 0
spec/modules-spec.js

@@ -48,6 +48,15 @@ describe('third-party module', function () {
     })
   })
 
+  describe('coffee-script', function () {
+    it('can be registered and used to require .coffee files', function () {
+      assert.doesNotThrow(function () {
+        require('coffee-script').register()
+        assert.strictEqual(require('./fixtures/module/test.coffee'), true)
+      })
+    })
+  })
+
   describe('global variables', function () {
     describe('process', function () {
       it('can be declared in a module', function () {