Skip to content

Commit 35804dc

Browse files
committed
Use Babel for building the tool
Unfortunately I'm getting the SIGSEV error now when running the tests on Node v0.12, so I'm removing this version from Travis.
1 parent 5721795 commit 35804dc

File tree

4 files changed

+9
-17
lines changed

4 files changed

+9
-17
lines changed

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
sudo: false
22
language: node_js
33
node_js:
4-
- "0.12"
54
- "0.10"

package.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
},
1313
"main": "dist/main.js",
1414
"scripts": {
15-
"watch": "jsx src/ dist/ --harmony --strip-types -w",
16-
"build": "rm -rf dist/ && jsx src/ dist/ --harmony --strip-types --no-cache-dir",
15+
"watch": "babel src/ --out-dir dist/ --watch",
16+
"build": "rm -rf dist/ && babel src/ --out-dir dist/",
1717
"prepublish": "npm run build",
1818
"test": "jest"
1919
},
@@ -30,14 +30,16 @@
3030
"recast": "^0.10.x"
3131
},
3232
"devDependencies": {
33+
"babel": "^5.6.23",
34+
"babel-jest": "^5.3.0",
3335
"es6-promise": "^2.0.1",
3436
"jest-cli": "^0.4.0",
35-
"react-tools": "^0.13.x",
3637
"rimraf": "^2.3.2",
3738
"temp": "^0.8.1"
3839
},
3940
"jest": {
40-
"scriptPreprocessor": "./tests/preprocessor",
41+
"scriptPreprocessor": "node_modules/babel-jest",
42+
"preprocessCachingDisabled": true,
4143
"testPathDirs": [
4244
"bin",
4345
"src"

src/__tests__/parse-test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ describe('parse', () => {
2929
var path = pathFromSource('({foo: "bar"})');
3030
var resolver = jest.genMockFunction().mockReturnValue(path);
3131
var handler = jest.genMockFunction();
32-
parse('', resolver, [handler]);
32+
parse('//empty', resolver, [handler]);
3333

3434
expect(resolver).toBeCalled();
3535
expect(handler.mock.calls[0][1]).toBe(path);
@@ -38,13 +38,13 @@ describe('parse', () => {
3838
it('errors if component definition is not found', () => {
3939
var resolver = jest.genMockFunction();
4040
expect(function() {
41-
parse('', resolver);
41+
parse('//empty', resolver);
4242
}).toThrow(parse.ERROR_MISSING_DEFINITION);
4343
expect(resolver).toBeCalled();
4444

4545
handler = jest.genMockFunction().mockReturnValue([]);
4646
expect(function() {
47-
parse('', resolver);
47+
parse('//empty', resolver);
4848
}).toThrow(parse.ERROR_MISSING_DEFINITION);
4949
expect(resolver).toBeCalled();
5050
});

tests/preprocessor.js

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)