Revert "Rename all test files from JS -> ES6"

This reverts commit 2abe85b8344de1102c1589a9ac9421a8b296f2b5.
This commit is contained in:
Robin Ward
2020-03-25 16:13:43 -04:00
parent a42668ead0
commit 4fa580fbd1
281 changed files with 29 additions and 35 deletions

View File

@ -1,41 +0,0 @@
import { mapRoutes } from "discourse/mapping-router";
import Theme from "admin/models/theme";
moduleFor("controller:admin-customize-themes", {
beforeEach() {
this.registry.register("router:main", mapRoutes());
},
needs: ["controller:adminUser"]
});
QUnit.test("can list themes correctly", function(assert) {
const defaultTheme = Theme.create({ id: 2, default: true, name: "default" });
const userTheme = Theme.create({
id: 3,
user_selectable: true,
name: "name"
});
const strayTheme1 = Theme.create({ id: 4, name: "stray1" });
const strayTheme2 = Theme.create({ id: 5, name: "stray2" });
const componentTheme = Theme.create({
id: 6,
name: "component",
component: true
});
const controller = this.subject({
model: [strayTheme2, strayTheme1, userTheme, defaultTheme, componentTheme]
});
assert.deepEqual(
controller.get("fullThemes").map(t => t.get("name")),
[strayTheme2, strayTheme1, userTheme, defaultTheme].map(t => t.get("name")),
"returns a list of themes without components"
);
assert.deepEqual(
controller.get("childThemes").map(t => t.get("name")),
[componentTheme].map(t => t.get("name")),
"separate components from themes"
);
});