@vnejs/helpers.omit-on-click 0.1.3 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -3
- package/src/tests/omit-on-click.test.ts +13 -0
- package/tsconfig.json +2 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vnejs/helpers.omit-on-click",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"tsconfig.json"
|
|
11
11
|
],
|
|
12
12
|
"scripts": {
|
|
13
|
-
"test": "
|
|
13
|
+
"test": "npx @vnejs/monorepo test",
|
|
14
14
|
"build": "npx @vnejs/monorepo package",
|
|
15
15
|
"publish:major:plugin": "npm run publish:major",
|
|
16
16
|
"publish:minor:plugin": "npm run publish:minor",
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
"author": "",
|
|
23
23
|
"license": "ISC",
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@vnejs/configs.ts-common": "~0.0
|
|
25
|
+
"@vnejs/configs.ts-common": "~0.1.0",
|
|
26
|
+
"@vnejs/configs.vitest": "~0.1.0"
|
|
26
27
|
}
|
|
27
28
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { describe, expect, it } from "vitest";
|
|
2
|
+
|
|
3
|
+
import { omitOnClick } from "../index.js";
|
|
4
|
+
|
|
5
|
+
describe("omitOnClick", () => {
|
|
6
|
+
it("removes onClick and keeps other fields", () => {
|
|
7
|
+
const onClick = () => {};
|
|
8
|
+
const item = { id: 1, label: "x", onClick };
|
|
9
|
+
|
|
10
|
+
expect(omitOnClick(item)).toEqual({ id: 1, label: "x" });
|
|
11
|
+
expect(omitOnClick(item)).not.toHaveProperty("onClick");
|
|
12
|
+
});
|
|
13
|
+
});
|