Skip to content

Commit

Permalink
Remove test runners stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
edoardocavazza committed Mar 10, 2024
1 parent f550f62 commit 4988955
Show file tree
Hide file tree
Showing 70 changed files with 80 additions and 4,295 deletions.
6 changes: 0 additions & 6 deletions .changeset/kind-sloths-rush.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
"@chialab/esbuild-plugin-meta-url": minor
"@chialab/esbuild-plugin-worker": minor
"@chialab/esbuild-plugin-html": minor
"@chialab/wtr-mocha-reporter": minor
"@chialab/es-test-runner": minor
"@chialab/rna-dev-server": minor
"@chialab/wds-plugin-hmr": minor
"@chialab/es-dev-server": minor
Expand All @@ -27,18 +25,14 @@
"@chialab/postcss-dart-sass": minor
"@chialab/postcss-preset-chialab": minor
"@chialab/postcss-url-rebase": minor
"@chialab/rna-browser-test-runner": minor
"@chialab/rna-bundler": minor
"@chialab/rna-config-loader": minor
"@chialab/rna-node-test-runner": minor
"@chialab/rna-saucelabs-test-runner": minor
"@chialab/vitest-axe": minor
"@chialab/vitest-provider-browserstack": minor
"@chialab/wds-plugin-legacy": minor
"@chialab/wds-plugin-node-resolve": minor
"@chialab/wds-plugin-polyfill": minor
"@chialab/wds-plugin-rna": minor
"@chialab/wtr-coverage-reporter": minor
---

Migrate from sucrase to oxc parser.
18 changes: 2 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,25 +30,12 @@ Build plugins are also available for the [Web Dev Server](https://modern-web.dev

- [Dev server for web apps](./docs/Dev-server-web-apps)

## RNA is a browser and node test runner

Built on the Web Dev Server, a configured instance of the [Web Test Runner](https://modern-web.dev/docs/test-runner/overview/) is also available for browsers. It comes with coverage and on-the-fly legacy browsers support.

Since RNA aims to support both browser and Node modules, you can test your modules in Node environments using the RNA test runner based on [Mocha](https://mochajs.org/). Coverage is also available thanks to the v8 coverage tool.

- [Testing in the browser](./docs/Testing-browser)
- [Testing in node](./docs/Testing-node)
- [Testing in SauceLabs](./docs/Testing-saucelabs)

## RNA is a cli

### Quick usage

```sh
npm i -D \
@chialab/rna \
@chialab/rna-dev-server \
@chialab/rna-browser-test-runner
npm i -D @chialab/rna
```

**package.json**
Expand All @@ -57,8 +44,7 @@ npm i -D \
{
"scripts": {
"start": "rna serve src --port 3000",
"build": "rna build src/index.html --output public",
"test": "rna test:browser 'test/**/*.spec'"
"build": "rna build src/index.html --output public"
}
}
```
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ Lately, some bundler scopes are very close to framework ones. You can build webs

## Incremental toolchain

Not all projects needs to bundle, serve and test using the RNA toolchain. For example, a project that uses Storybook as development environment does not likely need the RNA dev server, as well as a PHP frontend may not need the node test runner. That's why every feature have to be installed along the cli in order to work. This helps us to keep the node modules lighter, providing an easier path for dependencies updates and making faster and more optimized CI builds.
Not all projects needs to bundle and serve using the RNA toolchain. For example, a project that uses Storybook as development environment does not likely need the RNA dev server. That's why every feature have to be installed along the cli in order to work. This helps us to keep the node modules lighter, providing an easier path for dependencies updates and making faster and more optimized CI builds.
2 changes: 1 addition & 1 deletion docs/guide/building-javascript.md
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ export class Child {

## ENV variables

Many JavaScript modules uses process variables for both browser and Node environments. Expecially frameworks and web apps try to access the value of the `process.env.NODE_ENV` member in order to detect test or production environments. RNA comes with a plugin that automatically replaces the expression with the actual value.
Many JavaScript modules uses process variables for both browser and Node environments. Expecially frameworks and web apps try to access the value of the `process.env.NODE_ENV` member in order to detect development or production environments. RNA comes with a plugin that automatically replaces the expression with the actual value.

```sh
NODE_ENV='production' npx rna build src/index.js --output public/index.js
Expand Down
8 changes: 4 additions & 4 deletions docs/guide/dev-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ The RNA dev server can be installed with the following preset:
::: code-group

```sh[npm]
npm i -D @chialab/rna @chialab/rna-dev-server
npm i -D @chialab/rna
```

```sh[yarn]
yarn add -D @chialab/rna @chialab/rna-dev-server
yarn add -D @chialab/rna
```

```sh[pnpm]
pnpm add -D @chialab/rna @chialab/rna-dev-server
pnpm add -D @chialab/rna
```

:::
Expand All @@ -61,7 +61,7 @@ You can also specify a custom port using the `--port N` flag.

## Legacy browsers

Sometimes you may need to test on legacy browsers. Since the Dev Server is based on ESM support, in order to work in Internet Explorer or Safari 9 it needs to transpile and convert the module system.
Sometimes you may need to support legacy browsers. Since the Dev Server is based on ESM support, in order to work in Internet Explorer or Safari 9 it needs to transpile and convert the module system.
Installing the [legacy plugin](https://www.npmjs.com/package/@chialab/wds-plugin-legacy) will enable the convertion of ESM modules to [SystemJS](https://github.com/systemjs/systemjs) and it will inject required polyfills for `Promise` and `fetch`.

::: code-group
Expand Down
27 changes: 4 additions & 23 deletions docs/guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,6 @@ Build plugins are also available for the [Web Dev Server](https://modern-web.dev

- [Dev server for web apps](./dev-server)

## RNA is a browser and node test runner

Built on the Web Dev Server, a configured instance of the [Web Test Runner](https://modern-web.dev/docs/test-runner/overview/) is also available for browsers. It comes with coverage and on-the-fly legacy browsers support.

Since RNA aims to support both browser and Node modules, you can test your modules in Node environments using the RNA test runner based on [Mocha](https://mochajs.org/). Coverage is also available thanks to the v8 coverage tool.

- [Testing in the browser](./testing-browser)
- [Testing in node](./testing-node)

## RNA is a build framework

We built RNA to be pluggable and to be interoperable with other build systems. A lot of esbuild and postcss plugins are distribuited as standalone packages in order to be reused outside the RNA opinionated ecosystem. We also designed a micro-sdk for esbuild plugin authors that handles transform pipelines and emits chunks or files.
Expand All @@ -36,24 +27,15 @@ We built RNA to be pluggable and to be interoperable with other build systems. A
::: code-group

```sh[npm]
npm i -D \
@chialab/rna \
@chialab/rna-dev-server \
@chialab/rna-browser-test-runner
npm i -D @chialab/rna
```

```sh[yarn]
yarn add -D \
@chialab/rna \
@chialab/rna-dev-server \
@chialab/rna-browser-test-runner
yarn add -D @chialab/rna
```

```sh[pnpm]
pnpm add -D \
@chialab/rna \
@chialab/rna-dev-server \
@chialab/rna-browser-test-runner
pnpm add -D @chialab/rna
```

:::
Expand All @@ -64,8 +46,7 @@ pnpm add -D \
{
"scripts": {
"start": "rna serve src --port 3000",
"build": "rna build src/index.html --output public",
"test": "rna test:browser 'test/**/*.spec'"
"build": "rna build src/index.html --output public"
}
}
```
Expand Down
6 changes: 3 additions & 3 deletions docs/guide/migrate-CRA.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,15 @@ First, we need to install `rna` dependencies:
::: code-group

```sh[npm]
npm i -D @chialab/rna @chialab/rna-dev-server
npm i -D @chialab/rna
```

```sh[yarn]
yarn add -D @chialab/rna @chialab/rna-dev-server
yarn add -D @chialab/rna
```

```sh[pnpm]
pnpm add -D @chialab/rna @chialab/rna-dev-server
pnpm add -D @chialab/rna
```

:::
Expand Down
3 changes: 0 additions & 3 deletions docs/guide/testing-browser.md

This file was deleted.

3 changes: 0 additions & 3 deletions docs/guide/testing-node.md

This file was deleted.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
"@chialab/eslint-config": "^4.0.0",
"@chialab/prettier-config": "^1.2.2",
"@chialab/rna": "*",
"@chialab/rna-node-test-runner": "*",
"@vitest/coverage-v8": "^1.3.1",
"@yarnpkg/core": "^4.0.0-rc.6",
"chai-string": "^1.5.0",
Expand Down
55 changes: 0 additions & 55 deletions packages/es-test-runner/CHANGELOG.md

This file was deleted.

21 changes: 0 additions & 21 deletions packages/es-test-runner/LICENSE

This file was deleted.

25 changes: 0 additions & 25 deletions packages/es-test-runner/README.md

This file was deleted.

23 changes: 0 additions & 23 deletions packages/es-test-runner/build.js

This file was deleted.

14 changes: 0 additions & 14 deletions packages/es-test-runner/lib/index.js

This file was deleted.

44 changes: 0 additions & 44 deletions packages/es-test-runner/package.json

This file was deleted.

11 changes: 0 additions & 11 deletions packages/es-test-runner/tsconfig.json

This file was deleted.

Loading

0 comments on commit 4988955

Please sign in to comment.