-
Notifications
You must be signed in to change notification settings - Fork 278
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
include mocha fixes to run babel+JSX
- Loading branch information
Showing
2 changed files
with
15 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/** | ||
* A mocha hook that will run before each test. | ||
* | ||
* This sets up babel with options, and stores our JSX transpile target. | ||
*/ | ||
|
||
// Register all future "require"s with babel | ||
require("babel/register")({ | ||
// Let babel know to transpile JSX into E(...) | ||
jsxPragma: "E", | ||
}); | ||
|
||
// Store our custom JSX transpile target as a global | ||
E = require("../element.js"); |