create-rspeedy 0.14.0 → 0.14.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/CHANGELOG.md +12 -0
- package/dist/index.js +18 -4
- package/package.json +5 -4
- package/template-react-rstest-rltl/package.json +10 -0
- package/template-react-rstest-rltl/rstest.config.js +6 -0
- package/template-react-rstest-rltl/src/__tests__/index.test.jsx +17 -0
- package/template-react-vitest-rltl/vitest.config.js +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# create-rspeedy
|
|
2
2
|
|
|
3
|
+
## 0.14.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Add Rstest ReactLynx Testing Library template. ([#2328](https://github.com/lynx-family/lynx-stack/pull/2328))
|
|
8
|
+
|
|
9
|
+
## 0.14.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Fix the error when installing Lynx DevTool skill. ([#2427](https://github.com/lynx-family/lynx-stack/pull/2427))
|
|
14
|
+
|
|
3
15
|
## 0.14.0
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -61,7 +61,7 @@ create({
|
|
|
61
61
|
extraTools: [
|
|
62
62
|
{
|
|
63
63
|
value: 'vitest-rltl',
|
|
64
|
-
label: '
|
|
64
|
+
label: 'Vitest',
|
|
65
65
|
order: 'pre',
|
|
66
66
|
when: (templateName)=>'react-js' === templateName || 'react-ts' === templateName,
|
|
67
67
|
action: ({ distFolder, addAgentsMdSearchDirs })=>{
|
|
@@ -73,14 +73,28 @@ create({
|
|
|
73
73
|
});
|
|
74
74
|
addAgentsMdSearchDirs(from);
|
|
75
75
|
}
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
value: 'rstest-rltl',
|
|
79
|
+
label: 'Rstest',
|
|
80
|
+
order: 'pre',
|
|
81
|
+
when: (templateName)=>'react-js' === templateName || 'react-ts' === templateName,
|
|
82
|
+
action: ({ distFolder, addAgentsMdSearchDirs })=>{
|
|
83
|
+
const from = node_path.resolve(src_dirname, '..', 'template-react-rstest-rltl');
|
|
84
|
+
copyFolder({
|
|
85
|
+
from,
|
|
86
|
+
to: distFolder,
|
|
87
|
+
isMergePackageJson: true
|
|
88
|
+
});
|
|
89
|
+
addAgentsMdSearchDirs(from);
|
|
90
|
+
}
|
|
76
91
|
}
|
|
77
92
|
],
|
|
78
93
|
extraSkills: [
|
|
79
94
|
{
|
|
80
95
|
label: 'Lynx DevTool',
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
]
|
|
96
|
+
source: 'lynx-community/skills',
|
|
97
|
+
value: 'lynx-devtool'
|
|
84
98
|
}
|
|
85
99
|
],
|
|
86
100
|
mapESLintTemplate (templateName) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-rspeedy",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.2",
|
|
4
4
|
"description": "Create Rspeedy-powered ReactLynx apps with one command",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"webpack",
|
|
@@ -35,10 +35,11 @@
|
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@rsbuild/plugin-type-check": "1.3.4",
|
|
38
|
+
"@rstest/core": "0.8.1",
|
|
38
39
|
"@lynx-js/qrcode-rsbuild-plugin": "^0.4.6",
|
|
39
|
-
"@lynx-js/react": "^0.
|
|
40
|
-
"@lynx-js/react-rsbuild-plugin": "^0.
|
|
41
|
-
"@lynx-js/rspeedy": "^0.14.
|
|
40
|
+
"@lynx-js/react": "^0.119.0",
|
|
41
|
+
"@lynx-js/react-rsbuild-plugin": "^0.16.0",
|
|
42
|
+
"@lynx-js/rspeedy": "^0.14.2"
|
|
42
43
|
},
|
|
43
44
|
"engines": {
|
|
44
45
|
"node": ">=18"
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// Copyright 2024 The Lynx Authors. All rights reserved.
|
|
2
|
+
// Licensed under the Apache License Version 2.0 that can be found in the
|
|
3
|
+
// LICENSE file in the root directory of this source tree.
|
|
4
|
+
import '@testing-library/jest-dom'
|
|
5
|
+
import { expect, test } from '@rstest/core'
|
|
6
|
+
import { getQueriesForElement, render } from '@lynx-js/react/testing-library'
|
|
7
|
+
|
|
8
|
+
import { App } from '../App'
|
|
9
|
+
|
|
10
|
+
test('App', async () => {
|
|
11
|
+
render(<App />)
|
|
12
|
+
|
|
13
|
+
const { findByText } = getQueriesForElement(elementTree.root)
|
|
14
|
+
const element = await findByText('Tap the logo and have fun!')
|
|
15
|
+
|
|
16
|
+
expect(element).toBeInTheDocument()
|
|
17
|
+
})
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineConfig
|
|
2
|
-
import {
|
|
1
|
+
import { defineConfig } from 'vitest/config'
|
|
2
|
+
import { vitestTestingLibraryPlugin } from '@lynx-js/react/testing-library/plugins'
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
export default defineConfig({
|
|
5
|
+
plugins: [
|
|
6
|
+
vitestTestingLibraryPlugin(),
|
|
7
|
+
],
|
|
6
8
|
test: {},
|
|
7
9
|
})
|
|
8
|
-
|
|
9
|
-
export default mergeConfig(defaultConfig, config)
|