Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch tests to node-tap #58

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"source": "src/index.ts",
"types": "dist/src/index.d.ts",
"scripts": {
"test": "ts-node node_modules/tape/bin/tape test/*.test.ts | tap-spec",
"test": "tap test/*.test.ts --ts | tap-spec",
"watch": "microbundle watch --format modern,cjs,umd --globals three=THREE --external three",
"dist": "microbundle --format modern,cjs,umd --globals three=THREE --external three",
"preversion": "npm run dist && npm test",
Expand Down Expand Up @@ -40,16 +40,18 @@
"@types/three": ">=0.125.x"
},
"devDependencies": {
"@types/tap": "^15.0.5",
"@types/tape": "4.13.1",
"@typescript-eslint/eslint-plugin": "4.24.0",
"@typescript-eslint/parser": "4.24.0",
"@typescript-eslint/eslint-plugin": "4.28.3",
"@typescript-eslint/parser": "4.28.3",
"cannon-es": "0.18.0",
"eslint": "7.30.0",
"esm": "3.2.25",
"microbundle": "0.13.3",
"tap": "^15.0.9",
"tap-spec": "5.0.0",
"tape": "5.2.2",
"three": "0.128.0",
"three": "0.130.1",
"ts-node": "10.1.0",
"typescript": "4.2.4"
},
Expand Down
4 changes: 2 additions & 2 deletions test/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// See: https://github.com/substack/tape/issues/514
// eslint-disable-next-line no-global-assign,@typescript-eslint/no-var-requires
require = require('esm')(module);
// require = require('esm')(module);

import { Box, ConvexPolyhedron, Cylinder, Shape, Sphere, Trimesh } from 'cannon-es';
import * as test from 'tape';
import { test } from 'tap';
import { BoxBufferGeometry, BufferGeometry, Group, Matrix4, Mesh, Vector3 } from 'three';
import { Geometry } from 'three/examples/jsm/deprecated/Geometry';
import { ShapeResult, ShapeType, threeToCannon } from '../';
Expand Down
2 changes: 2 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"lib": ["es6", "dom"],
"target": "es6",
"declaration": true,
"esModuleInterop": true,
"module": "ESNext",
"typeRoots": ["node_modules/@types"],
"strict": true,
},
Expand Down
Loading