mirror of
https://github.com/konvajs/konva.git
synced 2026-01-22 21:02:26 +08:00
enable all tests
This commit is contained in:
3
.github/workflows/test.yml
vendored
3
.github/workflows/test.yml
vendored
@@ -1,4 +1,4 @@
|
|||||||
name: Node.js CI
|
name: Test
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@@ -21,5 +21,4 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version: ${{ matrix.node-version }}
|
||||||
- run: npm install
|
- run: npm install
|
||||||
- run: npm run build --if-present
|
|
||||||
- run: npm test
|
- run: npm test
|
||||||
|
|||||||
@@ -18,9 +18,8 @@
|
|||||||
"start": "npm run test:watch",
|
"start": "npm run test:watch",
|
||||||
"compile": "npm run clean && npm run tsc && cp ./src/index-types.d.ts ./lib/index-types.d.ts && npm run rollup",
|
"compile": "npm run clean && npm run tsc && cp ./src/index-types.d.ts ./lib/index-types.d.ts && npm run rollup",
|
||||||
"build": "npm run compile && cp ./src/index-types.d.ts ./lib && gulp build",
|
"build": "npm run compile && cp ./src/index-types.d.ts ./lib && gulp build",
|
||||||
"full-build": "npm run build && npm t",
|
|
||||||
"test:node:import": "node ./test/import-test.js",
|
"test:node:import": "node ./test/import-test.js",
|
||||||
"test": "npm run build && npm run test:browser",
|
"test": "npm run test:node:import && npm run test:browser && npm run test:node",
|
||||||
"test:build": "parcel build ./test/unit-tests.html --dist-dir test-build --target none --public-url ./ --no-source-maps",
|
"test:build": "parcel build ./test/unit-tests.html --dist-dir test-build --target none --public-url ./ --no-source-maps",
|
||||||
"test:browser": "npm run test:build && mocha-headless-chrome -f ./test-build/unit-tests.html -a disable-web-security",
|
"test:browser": "npm run test:build && mocha-headless-chrome -f ./test-build/unit-tests.html -a disable-web-security",
|
||||||
"test:node": "env TS_NODE_PROJECT=\"./test/tsconfig.json\" mocha -r ts-node/register test/unit/**/*.ts --exit",
|
"test:node": "env TS_NODE_PROJECT=\"./test/tsconfig.json\" mocha -r ts-node/register test/unit/**/*.ts --exit",
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"outDir": "lib",
|
|
||||||
"target": "ES2015",
|
"target": "ES2015",
|
||||||
"noEmitOnError": true,
|
"noEmitOnError": true,
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
"lib": ["ES2015", "dom"]
|
"lib": ["ES2015", "dom"],
|
||||||
|
"module": "CommonJS"
|
||||||
},
|
},
|
||||||
"include": ["../src/*.ts"]
|
"include": ["../src/*.ts"]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -133,8 +133,6 @@ describe('TouchEvents', function () {
|
|||||||
layer.add(circle);
|
layer.add(circle);
|
||||||
stage.add(layer);
|
stage.add(layer);
|
||||||
|
|
||||||
var top = stage.content.getBoundingClientRect().top;
|
|
||||||
|
|
||||||
// reset inDoubleClickWindow
|
// reset inDoubleClickWindow
|
||||||
Konva.inDblClickWindow = false;
|
Konva.inDblClickWindow = false;
|
||||||
|
|
||||||
@@ -287,8 +285,6 @@ describe('TouchEvents', function () {
|
|||||||
var stageContentTouchstart = 0;
|
var stageContentTouchstart = 0;
|
||||||
var stageContentTouchend = 0;
|
var stageContentTouchend = 0;
|
||||||
|
|
||||||
var top = stage.content.getBoundingClientRect().top;
|
|
||||||
|
|
||||||
circle.on('touchend', function () {
|
circle.on('touchend', function () {
|
||||||
circleTouchend++;
|
circleTouchend++;
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { assert } from 'chai';
|
import { assert } from 'chai';
|
||||||
import KonvaModule from '../../lib/index';
|
import KonvaModule from '../../src/index';
|
||||||
import '../../lib/index-node';
|
import '../../src/index-node';
|
||||||
|
|
||||||
export const Konva = KonvaModule;
|
export const Konva = KonvaModule;
|
||||||
|
|
||||||
@@ -10,8 +10,8 @@ Konva.enableTrace = true;
|
|||||||
Konva.showWarnings = true;
|
Konva.showWarnings = true;
|
||||||
|
|
||||||
import { imagediff } from './imagediff';
|
import { imagediff } from './imagediff';
|
||||||
import { Layer } from '../../lib/Layer.js';
|
import { Layer } from '../../src/Layer.js';
|
||||||
import { Stage } from '../../lib/Stage.js';
|
import { Stage } from '../../src/Stage.js';
|
||||||
|
|
||||||
// reset some data
|
// reset some data
|
||||||
beforeEach(function () {
|
beforeEach(function () {
|
||||||
|
|||||||
Reference in New Issue
Block a user