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

Fix failing vitest unit tests #3587

Merged
merged 2 commits into from
Oct 6, 2022
Merged
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
4 changes: 0 additions & 4 deletions packages/mermaid-example-diagram/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@
"lint": "eslint --cache --ignore-path .gitignore . && yarn lint:jison && prettier --check .",
"lint:fix": "eslint --fix --ignore-path .gitignore . && prettier --write .",
"lint:jison": "ts-node-esm src/jison/lint.mts",
"ci": "vitest run",
"test": "yarn lint && vitest run",
"test:watch": "vitest --coverage --watch",
"todo-prepublishOnly": "yarn build && yarn test",
"todo-prepare": "concurrently \"husky install ../../.husky\" \"yarn build\"",
"todo-pre-commit": "lint-staged"
},
Expand Down
4 changes: 0 additions & 4 deletions packages/mermaid-mindmap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@
"lint": "eslint --cache --ignore-path .gitignore . && yarn lint:jison && prettier --check .",
"lint:fix": "eslint --fix --ignore-path .gitignore . && prettier --write .",
"lint:jison": "ts-node-esm src/jison/lint.mts",
"ci": "vitest run",
"test": "yarn lint && vitest run",
"test:watch": "vitest --coverage --watch",
"todo-prepublishOnly": "yarn build && yarn test",
"todo-prepare": "concurrently \"husky install ../../.husky\" \"yarn build\"",
"todo-pre-commit": "lint-staged"
},
Expand Down
9 changes: 1 addition & 8 deletions packages/mermaid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@
"cypress": "cypress run",
"cypress:open": "cypress open",
"e2e": "start-server-and-test dev http://localhost:9000/ cypress",
"ci": "vitest run",
"test": "yarn lint && vitest run",
"test:watch": "vitest --coverage --watch",
"prepublishOnly": "yarn build && yarn test",
"todo-prepare": "concurrently \"husky install\" \"yarn build\"",
"pre-commit": "lint-staged"
},
Expand Down Expand Up @@ -92,8 +88,6 @@
"@types/stylis": "^4.0.2",
"@typescript-eslint/eslint-plugin": "^5.37.0",
"@typescript-eslint/parser": "^5.37.0",
"@vitest/coverage-c8": "^0.23.2",
"@vitest/ui": "^0.23.2",
"concurrently": "^7.4.0",
"coveralls": "^3.1.1",
"cypress": "^10.0.0",
Expand Down Expand Up @@ -125,8 +119,7 @@
"start-server-and-test": "^1.12.6",
"ts-node": "^10.9.1",
"typescript": "^4.8.3",
"unist-util-flatmap": "^1.0.0",
"vitest": "^0.23.1"
"unist-util-flatmap": "^1.0.0"
},
"resolutions": {
"d3": "^7.0.0"
Expand Down
1 change: 0 additions & 1 deletion packages/mermaid/src/diagrams/gantt/ganttDb.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// @ts-nocheck TODO: Fix TS
import moment from 'moment-mini';
import ganttDb from './ganttDb';
import { it, describe } from 'vitest';
import { convert } from '../../tests/util';

describe('when using the ganttDb', function () {
Expand Down
1 change: 0 additions & 1 deletion packages/mermaid/src/mermaid.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import mermaid from './mermaid';
import { mermaidAPI } from './mermaidAPI';
import './diagram-api/diagram-orchestration';
import { vi, describe, it, beforeEach, afterEach, expect } from 'vitest';
const spyOn = vi.spyOn;

vi.mock('./mermaidAPI');
Expand Down
2 changes: 1 addition & 1 deletion packages/mermaid/src/utils.spec.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { vi, describe, it, expect, beforeEach } from 'vitest';
import { vi } from 'vitest';
import utils from './utils';
import assignWithDepth from './assignWithDepth';
import { detectType } from './diagram-api/detectType';
Expand Down
67 changes: 0 additions & 67 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.