@justeattakeaway/pie-webc-core 14.0.0 → 14.0.2
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/README.md +2 -2
- package/package.json +4 -7
package/README.md
CHANGED
|
@@ -59,7 +59,7 @@ Other dependencies may be added in future to make it easier for people to instal
|
|
|
59
59
|
|
|
60
60
|
Check out our [contributing guide](https://github.com/justeattakeaway/pie/wiki/Contributing-Guide) for more information on [local development](https://github.com/justeattakeaway/pie/wiki/Contributing-Guide#local-development).
|
|
61
61
|
|
|
62
|
-
To run the unit tests, simply run `yarn test --filter
|
|
62
|
+
To run the unit tests, simply run `yarn test --filter=@justeattakeaway/pie-webc-core` from the root of the monorepo.
|
|
63
63
|
|
|
64
64
|
## Testing
|
|
65
65
|
|
|
@@ -74,7 +74,7 @@ We write unit tests for small pieces of functionality that can be tested in isol
|
|
|
74
74
|
We write browser tests for functionality that requires a browser environment to test. This could be things such as component class mixins. For these, we run our tests using Playwright. This allows us to run our tests in a real browser environment and test things such as DOM manipulation and events. A useful pattern for this kind of testing is to write a mock component that uses the mixin you want to test. This allows you to test the mixin in isolation without having to worry about the implementation of the component itself.
|
|
75
75
|
|
|
76
76
|
### Naming and running tests
|
|
77
|
-
Currently, for writing unit tests we simply name the file `**/*.spec.ts`. To write browser tests, we name the file `**/*.browser.spec.ts`. This allows us to run all unit tests using `yarn test --filter
|
|
77
|
+
Currently, for writing unit tests we simply name the file `**/*.spec.ts`. To write browser tests, we name the file `**/*.browser.spec.ts`. This allows us to run all unit tests using `yarn test --filter=@justeattakeaway/pie-webc-core` and all browser tests using `yarn test:browsers --filter=@justeattakeaway/pie-webc-core`.
|
|
78
78
|
|
|
79
79
|
## Bundling
|
|
80
80
|
When we build the package, we run a plugin for Rollup named `rollup-plugin-visualizer`. This generates a file named `stats.html` in the root of the package. This file can be viewed in the browser to visualise the bundled Javascript and better understand what contributes to the size of the final build output.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@justeattakeaway/pie-webc-core",
|
|
3
|
-
"version": "14.0.
|
|
3
|
+
"version": "14.0.2",
|
|
4
4
|
"description": "PIE design system base classes, mixins and utilities for web components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"lint:scripts:fix": "run -T eslint . --fix",
|
|
21
21
|
"test": "run -T vitest run --config ../../../vite.config.js",
|
|
22
22
|
"test:ci": "yarn test",
|
|
23
|
-
"test:browsers": "
|
|
23
|
+
"test:browsers": "run -T playwright test -c ./playwright-lit.config.ts",
|
|
24
24
|
"test:browsers:ci": "yarn test:browsers",
|
|
25
25
|
"test:watch": "run -T vitest"
|
|
26
26
|
},
|
|
@@ -28,12 +28,9 @@
|
|
|
28
28
|
"lit": "3.2.0"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
|
-
"@justeattakeaway/pie-css": "1.
|
|
31
|
+
"@justeattakeaway/pie-css": "1.x"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@justeattakeaway/pie-components-config": "0.21.
|
|
35
|
-
},
|
|
36
|
-
"volta": {
|
|
37
|
-
"extends": "../../../package.json"
|
|
34
|
+
"@justeattakeaway/pie-components-config": "0.21.3"
|
|
38
35
|
}
|
|
39
36
|
}
|