Skip to content

Commit ce8fb1b

Browse files
authored
Merge pull request #30 from msgpack/test-dist
Improve tests for dist files
2 parents c5b34b7 + f72f0ff commit ce8fb1b

12 files changed

+602
-597
lines changed

Makefile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@ test:
44

55
test-all:
66
npm ci
7-
npm run test:browser
8-
npm run test:cover
7+
npm publish --dry-run
98

10-
publish: validate-git-status test-all
9+
publish: validate-git-status
1110
npm publish
1211
git push origin master
1312
git push origin master --tags

README.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -216,23 +216,28 @@ If you use NodeJS and/or webpack, their module resolvers use the suitable one au
216216

217217
## Maintenance
218218

219-
## CI
219+
## Testing
220220

221-
See [.travis.yml](./.travis.yml) for details.
221+
test matrix:
222+
223+
* WebAssembly availability
224+
* `WASM=force` / `WASM=never`
225+
* TypeScript targets
226+
* `target=es2019` / `target=es5`
227+
* JavaScript engines
228+
* NodeJS, borwsers (Chrome, Firefox, Safari, IE11)
229+
230+
See [test:* in package.json](./package.json) and [.travis.yml](./.travis.yml) for details.
222231

223232
### Relase Engineering
224233

225234
```console
226235
# run tests on NodeJS, Chrome, and Firefox
227-
make test
236+
make test-all
228237

229238
# edit the changelog
230239
code CHANGELOG.md
231240

232-
# prepare release engineering
233-
npm version major|minor|patch
234-
git push origin master
235-
236241
# run the publishing task
237242
make publish
238243
```

karma.conf.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { sauceLabs, sauceLaunchers } from "./sauceLabs";
2-
2+
const path = require("path");
33
const webpack = require("webpack");
44

55
export default function configure(config: any) {
@@ -47,14 +47,17 @@ export default function configure(config: any) {
4747
},
4848
resolve: {
4949
extensions: [".ts", ".tsx", ".mjs", ".js", ".json", ".wasm"],
50+
alias: {
51+
"@msgpack/msgpack": path.resolve(__dirname, "src"),
52+
},
5053
},
5154
module: {
5255
rules: [
5356
{
5457
test: /\.tsx?$/,
5558
loader: "ts-loader",
5659
options: {
57-
configFile: "tsconfig.karma.json",
60+
configFile: "tsconfig.test-karma.json",
5861
// FIXME: some types for dependencies cannot be resolved, so ignore type checking for now.
5962
transpileOnly: true,
6063
},

0 commit comments

Comments
 (0)