Skip to content

Commit

Permalink
chore: added ava for testing (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
nickytonline authored Aug 23, 2022
1 parent c514442 commit 2f418b7
Show file tree
Hide file tree
Showing 4 changed files with 865 additions and 12 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,8 @@ jobs:
- name: Lint
run: yarn lint

- name: Tests
run: yarn test

- name: Build
run: yarn build
15 changes: 14 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"build": "tsc",
"prepack": "yarn build",
"lint": "yarn eslint --ext .ts,.js,.mjs src",
"test": "yarn lint",
"test": "ava",
"dev": "cd example && netlify dev"
},
"dependencies": {
Expand All @@ -34,8 +34,21 @@
"@types/etag": "^1.8.1",
"@types/fs-extra": "^9.0.13",
"@types/node-fetch": "^2.6.1",
"ava": "^4.3.1",
"esbuild-node-loader": "^0.8.0",
"eslint": "8.22.0",
"jiti": "^1.13.0",
"typescript": "^4.6.2"
},
"ava": {
"extensions": {
"ts": "module"
},
"nodeArguments": [
"--loader=esbuild-node-loader"
],
"files": [
"test/**/*.test.ts"
]
}
}
5 changes: 5 additions & 0 deletions test/fake.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import test from 'ava'

test('sample test', (t) => {
t.pass()
})
Loading

0 comments on commit 2f418b7

Please sign in to comment.