Skip to content

Commit 1b90366

Browse files
committed
BREAKING_CHANGE: change behaviour of isMounted, mount, unmount, didMount, didUnmount methods which worked with vm store only; feat: add tests for abstract-view-model
1 parent b593bc3 commit 1b90366

12 files changed

+1072
-33
lines changed

.eslintignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@ nginx.conf
1515
jsconfig.json
1616
*.json
1717
.eslintrc.cjs
18-
post-build.mjs
18+
post-build.mjs
19+
vitest.config.ts

.eslintrc.cjs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,14 @@ module.exports = {
99
{ ignore: Object.keys(packageJson.peerDependencies) },
1010
],
1111
},
12+
overrides: [
13+
{
14+
files: [
15+
"*.test.ts",
16+
],
17+
parserOptions: {
18+
project: 'tsconfig.test.json',
19+
},
20+
}
21+
]
1222
};

package.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@
33
"version": "2.0.14",
44
"scripts": {
55
"clean": "rimraf dist",
6-
"check": "eslint . --fix",
6+
"check": "eslint . --fix && pnpm test",
77
"prebuild": "npm run clean && npm run check",
88
"build": "tsc && node ./post-build.mjs",
99
"pub:patch": "PUBLISH=true PUBLISH_VERSION=patch pnpm run build",
1010
"pub:minor": "PUBLISH=true PUBLISH_VERSION=minor pnpm run build",
11-
"pub:major": "PUBLISH=true PUBLISH_VERSION=major pnpm run build"
11+
"pub:major": "PUBLISH=true PUBLISH_VERSION=major pnpm run build",
12+
"test": "vitest run",
13+
"test:watch": "vitest watch"
1214
},
1315
"keywords": [
1416
"mobx",
@@ -40,10 +42,11 @@
4042
"@types/node": "20.14.5",
4143
"@types/react": "^18.3.3",
4244
"eslint": "8.57.0",
43-
"js2me-exports-post-build-script": "2.0.10",
4445
"js2me-eslint-config": "1.0.4",
46+
"js2me-exports-post-build-script": "2.0.10",
4547
"rimraf": "6.0.1",
46-
"typescript": "5.4.5"
48+
"typescript": "5.4.5",
49+
"vitest": "2.1.4"
4750
},
4851
"packageManager": "[email protected]+sha512.140036830124618d624a2187b50d04289d5a087f326c9edfc0ccd733d76c4f52c3a313d4fc148794a2a9d81553016004e6742e8cf850670268a7387fc220c903"
4952
}

0 commit comments

Comments
 (0)