-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor to enable `es2015` example Separate `instrument` and `coverage`
- Loading branch information
1 parent
f5091ac
commit d32de05
Showing
18 changed files
with
1,794 additions
and
358 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"env": { | ||
"test": { | ||
"sourceMaps": "inline", | ||
"retainLines": true, | ||
"presets": [ | ||
["env", { | ||
"targets": { | ||
"browsers": ["last 2 versions", "safari >= 7"] | ||
}, | ||
"modules": "amd" | ||
}] | ||
] | ||
} | ||
} | ||
} |
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,13 @@ | ||
{ | ||
"env": { | ||
"browser": true, | ||
"es6": true | ||
}, | ||
"globals": { | ||
"requirejs": true | ||
}, | ||
"parserOptions": { | ||
"ecmaVersion": 6, | ||
"sourceType": "module" | ||
} | ||
} |
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 @@ | ||
export default () => 'a'; |
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,10 @@ | ||
import chai from 'chai'; | ||
import getA from './a'; | ||
|
||
const { expect } = chai; | ||
|
||
describe('es2015 - a', () => { | ||
it('should return "a"', () => { | ||
expect(getA()).to.equal('a'); | ||
}); | ||
}); |
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,11 @@ | ||
<!doctype> | ||
<html> | ||
<head> | ||
<title>Test</title> | ||
<meta charset="utf-8"> | ||
</head> | ||
<body> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/mocha/4.0.1/mocha.min.js"></script> | ||
<script data-main="./main.js" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.5/require.min.js"></script> | ||
</body> | ||
</html> |
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,15 @@ | ||
(() => { | ||
requirejs.config({ | ||
paths: { | ||
chai: 'https://cdnjs.cloudflare.com/ajax/libs/chai/4.1.2/chai.min', | ||
}, | ||
}); | ||
requirejs(window.awFiles, () => { | ||
if (window.awDevtools) { | ||
// We need to wait for Chrome to open the `devtools` | ||
setTimeout(() => mocha.run(), 200); | ||
return; | ||
} | ||
mocha.run(); | ||
}); | ||
})(); |
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,12 @@ | ||
module.exports = { | ||
'instrument.exclude': [ | ||
'**/coverage/**', | ||
'**/external/**', | ||
'**/autogenerated/**', | ||
'**/*.(html|css|json|txt|ttf|woff|svg)', | ||
'*require*.js', | ||
'*sinon*.js', | ||
'*chai*.js', | ||
'**/*.js', | ||
], | ||
}; |
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
Oops, something went wrong.