diff --git a/README.md b/README.md
index 612deb0..8e526b0 100644
--- a/README.md
+++ b/README.md
@@ -16,8 +16,6 @@ This will cause `npx` to download the `makes` tool, along with the `aurelia` sca
## Development
-This scaffolding skeleton is in the early stage, not quite ready for adding features. We want to keep feature set manageable as Aurelia 2 is constantly evolving.
-
There are some tests for this skeleton, setup in package.json. (totally not required by makes)
## Unit tests
diff --git a/app-min/test__if_not_no-unit-tests/my-app.spec.ext b/app-min/test__if_not_no-unit-tests/my-app.spec.ext
index bc8ccfc..4aa5b78 100644
--- a/app-min/test__if_not_no-unit-tests/my-app.spec.ext
+++ b/app-min/test__if_not_no-unit-tests/my-app.spec.ext
@@ -1,38 +1,17 @@
-// @if mocha
-import { expect } from 'chai';
-// @endif
// @if vitest
-import { describe, it, expect } from 'vitest';
-// @endif
-// @if shadow-dom
-import { CustomElement } from 'aurelia';
+import { describe, it } from 'vitest';
// @endif
-import { render } from './helper';
import { MyApp } from '../src/my-app';
+import { createFixture } from '@aurelia/testing';
describe('my-app', () => {
it('should render message', async () => {
- const node = (await render('', MyApp)).firstElementChild;
- // @if shadow-dom
- // In Shadow DOM open mode, shadowRoot is also accessible through DOM API
- // node.shadowRoot
- // But only Aurelia API can access shadowRoot in both open and closed mode.
- const shadowRoot = CustomElement.for(node).shadowRoot;
- // @if babel
- const text = shadowRoot.textContent;
- // @endif
- // @if typescript
- const text = (shadowRoot as Node).textContent;
- // @endif
- // @endif
- // @if !shadow-dom
- const text = node.textContent;
- // @endif
- // @if jasmine || jest || vitest
- expect(text.trim()).toBe('Hello World!');
- // @endif
- // @if mocha
- expect(text.trim()).to.equal('Hello World!');
- // @endif
+ const { assertText } = await createFixture(
+ '',
+ {},
+ [MyApp],
+ ).started;
+
+ assertText('Hello World!', { compact: true });
});
});
diff --git a/common/.eslintrc.json b/common/.eslintrc.json
index ddd5a29..363f6ce 100644
--- a/common/.eslintrc.json
+++ b/common/.eslintrc.json
@@ -22,15 +22,9 @@
},
"env": {
- "es6": true,
+ "es2024": true,
"browser": true,
"node": true,
- // @if jasmine
- "jasmine": true,
- // @endif
- // @if mocha
- "mocha": true,
- // @endif
// @if jest
"jest": true,
// @endif
diff --git a/common/.htmlhintrc__skip-if-exists b/common/.htmlhintrc__skip-if-exists
deleted file mode 100644
index 7c147d8..0000000
--- a/common/.htmlhintrc__skip-if-exists
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "tagname-lowercase": true,
- "attr-lowercase": false,
- "attr-value-double-quotes": true,
- "attr-no-duplication": true,
- "doctype-first": false,
- "tag-pair": true,
- "spec-char-escape": true,
- "id-unique": true,
- "src-not-empty": true,
- "title-require": true
-}
diff --git a/common/.stylelintrc.json__skip-if-exists b/common/.stylelintrc.json__skip-if-exists
index 78d0a73..b1f26cd 100644
--- a/common/.stylelintrc.json__skip-if-exists
+++ b/common/.stylelintrc.json__skip-if-exists
@@ -6,9 +6,6 @@
// @if sass
"stylelint-config-standard-scss",
// @endif
- // @if less
- "stylelint-config-standard-less",
- // @endif
// @if css-module
"stylelint-config-css-modules"
// @endif
diff --git a/common/README.md__skip-if-exists b/common/README.md__skip-if-exists
index 7e4ef2e..f6b50be 100644
--- a/common/README.md__skip-if-exists
+++ b/common/README.md__skip-if-exists
@@ -93,18 +93,4 @@ Run unit tests in watch mode.
npm run test:watch
-// @if jasmine || mocha
-Unit tests run in browser through [browser-do](https://github.com/3cp/browser-do). Please check scripts in `package.json` for more details.
-
-By default, browser-do shuts down browser after tests. To keep browser window open for inspection, pass additional argument `-k` or `--keep-open`.
-
- npm run build:test && browser-do -k /* @if jasmine */--jasmine/* @endif *//* @if mocha */--mocha/* @endif */ --browser chrome < dist/entry.bundle.js
-
-// @if webpack
-Unit tests in watch mode is executed through stand webpack watch mode and the help of [webpack-shell-plugin-next](https://github.com/s00d/webpack-shell-plugin-next).
-// @endif
-// @if dumber
-Unit tests in watch mode is executed through standard `gulp.watch` with the help of [gulp-run](https://github.com/MrBoolean/gulp-run).
-// @endif
-// @endif
// @endif
diff --git a/common/package.json b/common/package.json
index 246a4d4..9d901a0 100644
--- a/common/package.json
+++ b/common/package.json
@@ -28,23 +28,16 @@
"devDependencies": {
"eslint": "^8.57.0",
"@aurelia/testing": /* @if latest */"latest"/* @endif *//* @if dev */"dev"/* @endif */,
- "htmlhint": "^1.1.4",
"stylelint": "^16.3.1",
// @if css
"stylelint-config-standard": "^36.0.0",
// @endif
- // @if less
- "stylelint-config-standard-less": "^3.0.1",
- // @endif
// @if sass
"stylelint-config-standard-scss": "^13.1.0",
// @endif
// @if css-module
"stylelint-config-css-modules": "^4.4.0",
// @endif
- // @if jasmine || mocha
- "browser-do": "^4.1.0",
- // @endif
},
"scripts": {
"lint:js": "eslint src/* @if !no-unit-tests */ test/* @endif *//* @if playwright */ e2e/* @endif *//* @if typescript */ --ext .js,.ts/* @endif */",
@@ -54,17 +47,7 @@
// @if sass
"lint:css": "stylelint \"src/**/*.scss\"",
// @endif
- // @if less
- "lint:css": "stylelint \"src/**/*.less\"",
- // @endif
- "lint:html": "htmlhint -c .htmlhintrc src",
- "lint": "npm run lint:js && npm run lint:html && npm run lint:css",
- // @if jest
+ "lint": "npm run lint:js && npm run lint:css",
"pretest": "npm run lint",
- // @endif
- // @if jasmine || mocha
- "test": "npm run test:headless",
- "pretest": "npm run lint && npm run build:test",
- // @endif
}
}
diff --git a/common/src/main.ext__if_app b/common/src/main.ext__if_app
index 958a924..daa5946 100644
--- a/common/src/main.ext__if_app
+++ b/common/src/main.ext__if_app
@@ -13,7 +13,7 @@ import { MyApp } from './my-app';
// They are for sharedStyles in shadowDOM.
// However, css files imported in other js/ts files are processed by style-loader.
// @endif
-// import shared from './shared./* @if css */css/* @endif *//* @if less */less/* @endif *//* @if sass */scss/* @endif */';
+// import shared from './shared./* @if css */css/* @endif *//* @if sass */scss/* @endif */';
// @endif
Aurelia
diff --git a/common/src/resource.d.ts__if_typescript b/common/src/resource.d.ts__if_typescript
index d3ef093..69ccc3e 100644
--- a/common/src/resource.d.ts__if_typescript
+++ b/common/src/resource.d.ts__if_typescript
@@ -15,12 +15,6 @@ declare module '*.module.css' {
const value: Record;
export default value;
}
-// @if less
-declare module '*.module.less' {
- const value: Record;
- export default value;
-}
-// @endif
// @if sass
declare module '*.module.scss' {
const value: Record;
@@ -30,9 +24,6 @@ declare module '*.module.scss' {
// @endif
// @if !css-module
declare module '*.css';
-// @if less
-declare module '*.less';
-// @endif
// @if sass
declare module '*.scss';
// @endif
diff --git a/common/test__if_not_no-unit-tests/helper.ext b/common/test__if_not_no-unit-tests/helper.ext
deleted file mode 100644
index abcaa84..0000000
--- a/common/test__if_not_no-unit-tests/helper.ext
+++ /dev/null
@@ -1,11 +0,0 @@
-import Aurelia, { CustomElement } from 'aurelia';
-export async function render(template/* @if typescript */: string/* @endif */, ...deps/* @if typescript */: readonly unknown[]/* @endif */)/* @if typescript */: Promise/* @endif */ {
- const wrapper = CustomElement.define({name: 'wrapper', template});
- const div = document.createElement('div');
- const au = Aurelia.register(deps).app({
- host: div,
- component: wrapper
- });
- await au.start();
- return div;
-}
diff --git a/common/test__if_not_no-unit-tests/setup.ext b/common/test__if_not_no-unit-tests/setup.ext
new file mode 100644
index 0000000..3748416
--- /dev/null
+++ b/common/test__if_not_no-unit-tests/setup.ext
@@ -0,0 +1,31 @@
+import { BrowserPlatform } from '@aurelia/platform-browser';
+import { setPlatform, onFixtureCreated/* @if typescript */, type IFixture/* @endif */ } from '@aurelia/testing';
+// @if vitest
+import { beforeAll, afterEach } from 'vitest';
+// @endif
+
+// Sets up the Aurelia environment for testing
+function bootstrapTextEnv() {
+ const platform = new BrowserPlatform(window);
+ setPlatform(platform);
+ BrowserPlatform.set(globalThis, platform);
+}
+
+const fixtures/* @if typescript */: IFixture