Skip to content

Commit 7eb8247

Browse files
committed
Run mocha in browser with karma runner
1 parent 3eb2794 commit 7eb8247

File tree

10 files changed

+1261
-24
lines changed

10 files changed

+1261
-24
lines changed

.github/workflows/nodejs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ jobs:
2222
npm install
2323
npm run build --if-present
2424
npm test
25+
npm run test:browser

karma.conf.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
process.env.CHROME_BIN = require('puppeteer').executablePath()
2+
3+
module.exports = function(config) {
4+
config.set({
5+
browsers: ['ChromeHeadless'],
6+
7+
frameworks: ['mocha', 'chai'],
8+
9+
files: [
10+
'tests/spec/*.test.js'
11+
],
12+
13+
singleRun: true,
14+
15+
client: {
16+
mocha: {
17+
require: [
18+
require.resolve('./dist/js/emojify-browser.min.js')
19+
]
20+
}
21+
}
22+
})
23+
}

0 commit comments

Comments
 (0)