Skip to content

Commit

Permalink
Update mocha runner for no JSX pragma
Browse files Browse the repository at this point in the history
  • Loading branch information
ihodes committed Nov 24, 2014
1 parent 90b59c0 commit 66d16ab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
7 changes: 0 additions & 7 deletions preprocessor.js

This file was deleted.

8 changes: 2 additions & 6 deletions tests/js/jsx-stub-transformer.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,14 @@ function shouldStub(filename) {
return false;
}

// Returns transformed JS if transformation was necessary, otherwise null.
// Returns transformed JS.
function transform(filename) {
if (shouldStub(filename)) {
return reactStub;
}

var content = fs.readFileSync(filename, 'utf8');
if (content.indexOf('@jsx') > 0) {
return ReactTools.transform(content, {harmony: true});
} else {
return null;
}
return ReactTools.transform(content, {harmony: true});
}

// Implements the node.js "compiler" API
Expand Down

0 comments on commit 66d16ab

Please sign in to comment.