Skip to content

Commit e27d4fe

Browse files
committed
switch to type: module
1 parent 7ee07ce commit e27d4fe

File tree

7 files changed

+11
-9
lines changed

7 files changed

+11
-9
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Then run tests:
4949
npm test
5050
```
5151

52-
Then run tests in watch mode:
52+
Or run tests in watch mode:
5353

5454
```shell
5555
npm run tdd

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "demo-bts",
33
"version": "0.5.0-alpha.1",
44
"private": true,
5+
"type": "module",
56
"dependencies": {
67
"@ui-schema/dictionary": "~0.1.0-alpha.2",
78
"@ui-schema/ds-bootstrap": "~0.5.0-alpha.2",
@@ -30,7 +31,8 @@
3031
"scripts": {
3132
"start": "cross-env NODE_ENV=development vite",
3233
"build": "cross-env NODE_ENV=production vite build",
33-
"test": "vitest run --coverage",
34-
"tdd": "vitest"
34+
"test": "vitest run --coverage --browser.headless=true",
35+
"tdd": "vitest",
36+
"tdd-headless": "vitest --browser.headless=true"
3537
}
3638
}

src/App.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22
import 'bootstrap/dist/css/bootstrap.css';
3-
import NavProject from "./components/NavProject";
4-
import DemoEditor from "./components/DemoEditor";
3+
import NavProject from "./components/NavProject.jsx";
4+
import DemoEditor from "./components/DemoEditor.jsx";
55

66
export default function App() {
77
return (

src/App.test.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { expect, test } from 'vitest'
22
import { render } from 'vitest-browser-react'
33
import { userEvent } from '@vitest/browser/context'
4-
import App from './App';
4+
import App from './App.jsx';
55

66
test('renders header', async() => {
77
const {getByText} = render(<App/>);

src/components/DemoEditor.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { UIMetaProvider } from '@ui-schema/react/UIMeta'
44
import { UIStoreProvider, createStore } from '@ui-schema/react/UIStore'
55
import { storeUpdater } from '@ui-schema/react/storeUpdater'
66
import { WidgetEngine } from '@ui-schema/react/WidgetEngine'
7-
import { browserT } from '../t';
7+
import { browserT } from '../t.js';
88
import { DefaultHandler } from '@ui-schema/react/DefaultHandler';
99
import { ValidityReporter } from '@ui-schema/react/ValidityReporter';
1010
import { schemaPluginsAdapterBuilder } from '@ui-schema/react/SchemaPluginsAdapter';

src/components/NavProject.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from "react";
2-
import GithubLogo from "./GithubLogo";
2+
import GithubLogo from "./GithubLogo.jsx";
33

44
export default function NavProject() {
55
return <React.Fragment>

src/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22
import { createRoot } from 'react-dom/client';
33
import './index.css';
4-
import App from './App';
4+
import App from './App.jsx';
55

66
createRoot(document.getElementById('root'))
77
.render(<App/>);

0 commit comments

Comments
 (0)