Skip to content
This repository
Browse code

Allow camelCase test filename

  • Loading branch information...
commit a785630843e8a05455b26efcb0957e992d2d7ec3 1 parent 03f60dd
Romain authored April 06, 2012 Maciej Małecki committed June 17, 2012
4  bin/vows
@@ -14,10 +14,10 @@ var fileExt, specFileExt;
14 14
 try {
15 15
     var coffee = require('coffee-script');
16 16
     fileExt     = /\.(js|coffee)$/;
17  
-    specFileExt = /[.(-|_)](test|spec)\.(js|coffee)$/;
  17
+    specFileExt = /[.(-|_)]((t|T)est|(s|S)pec)\.(js|coffee)$/;
18 18
 } catch (_) {
19 19
     fileExt     = /\.js$/;
20  
-    specFileExt = /[.(-|_)](test|spec)\.js$/;
  20
+    specFileExt = /[.(-|_)]((t|T)est|(s|S)pec)\.js$/;
21 21
 }
22 22
 
23 23
 var inspect = require('eyes').inspector({
14  test/VowsCamelCaseTest.js
... ...
@@ -0,0 +1,14 @@
  1
+var vows = require('../lib/vows'),
  2
+    assert = require('assert');
  3
+
  4
+vows.describe("Vows test file with camel case").addBatch({
  5
+
  6
+  "The test file": {
  7
+    topic: function () {
  8
+        return { flag: true };
  9
+    },
  10
+    "is run": function (topic) {
  11
+        assert.isTrue(topic.flag);
  12
+    }
  13
+  }
  14
+}).export(module);

0 notes on commit a785630

Please sign in to comment.
Something went wrong with that request. Please try again.