mirror of
https://github.com/home-assistant/frontend.git
synced 2025-12-24 20:55:49 +00:00
Rspack (#22807)
* Add rspack * Remove TransformAsyncModulesPlugin from rspack * Migrate all webpack usage to rspack * Migrate tests to vitest * Fix test suites * Remove chai dependency * Fix compute_state_display tests * Fix resolveTimeZone * Reduces test pipeline * Revert test ci * optimize chunk filtering * Migrate landing-page to rspack * Update rspack dependencies * Add rsdoctor * Fix prod build bundle size * Use rsdoctor for demo stats * Remove unused webpack configs * Update build-scripts/rspack.cjs Co-authored-by: Petar Petrov <MindFreeze@users.noreply.github.com> * Fix eslint * Update rspack * Remove unused code --------- Co-authored-by: Petar Petrov <MindFreeze@users.noreply.github.com>
This commit is contained in:
15
test/common/entity/compute_domain.test.ts
Normal file
15
test/common/entity/compute_domain.test.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { assert, describe, it } from "vitest";
|
||||
|
||||
import { computeDomain } from "../../../src/common/entity/compute_domain";
|
||||
|
||||
describe("computeDomain", () => {
|
||||
it("Returns domains", () => {
|
||||
assert.equal(computeDomain("sensor.bla"), "sensor");
|
||||
assert.equal(computeDomain("switch.bla"), "switch");
|
||||
assert.equal(computeDomain("light.bla"), "light");
|
||||
assert.equal(
|
||||
computeDomain("persistent_notification.bla"),
|
||||
"persistent_notification"
|
||||
);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user