Skip to content

Commit ef85048

Browse files
authored
Merge pull request #13 from github/test
Create tests
2 parents 9cea198 + 905e517 commit ef85048

8 files changed

Lines changed: 1870 additions & 20 deletions

File tree

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
dist
2+
prettier.config.js

.eslintrc.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"extends": [
3+
"plugin:flowtype/recommended",
4+
"plugin:github/es6",
5+
"plugin:github/browser"
6+
],
7+
"parser": "babel-eslint"
8+
}

.github/workflows/test.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Node CI
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v1
10+
- name: Use Node.js 12.x
11+
uses: actions/setup-node@v1
12+
with:
13+
node-version: 12.x
14+
- name: npm install, build, and test
15+
run: |
16+
npm ci
17+
npm test
18+
env:
19+
CI: true

karma.config.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
module.exports = function(config) {
2+
config.set({
3+
frameworks: ['mocha', 'chai'],
4+
files: [{pattern: 'dist/index.esm.js', type: 'module'}, {pattern: 'test/test.js', type: 'module'}],
5+
reporters: ['mocha'],
6+
port: 9876,
7+
colors: true,
8+
logLevel: config.LOG_INFO,
9+
browsers: ['ChromeHeadless'],
10+
autoWatch: false,
11+
singleRun: true,
12+
concurrency: Infinity
13+
})
14+
}

0 commit comments

Comments
 (0)