Skip to content

Commit

Permalink
Add test template
Browse files Browse the repository at this point in the history
  • Loading branch information
kochizufan committed Nov 22, 2023
1 parent 4c60370 commit 944f697
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"build:es5": "webpack --config webpack_config/webpack.config.product.js",
"build:es6": "tsc",
"test": "npm run test:src && npm run test:node",
"test:new": "jest spec/new.spec.ts",
"test:src": "jest spec/tin.spec.ts",
"test:node": "npm run build:es5 && jest spec/tin_node.spec.js",
"preversion": "npm run lint & npm run test",
Expand Down
11 changes: 11 additions & 0 deletions spec/new.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import func2 from '../src/triangleTest';

const testSet = () => {
describe('Test by actual data', () => {
it('Compare with actual data', () => {
expect(func2()).toEqual(2);
});
});
};

describe("Test for Tin function", testSet);
5 changes: 5 additions & 0 deletions src/triangleTest.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { featureCollection, lineString, point, polygon } from "@turf/helpers";

export default function triangleTest() {
return 2;
}

0 comments on commit 944f697

Please sign in to comment.