DEV: introduces prettier for es6 files

This commit is contained in:
Joffrey JAFFEUX
2018-06-15 17:03:24 +02:00
committed by GitHub
parent c7ee70941e
commit 03a7d532cf
1162 changed files with 60667 additions and 29659 deletions

View File

@ -1,17 +1,21 @@
import Theme from 'admin/models/theme';
import Theme from "admin/models/theme";
QUnit.module("model:theme");
QUnit.test('can add an upload correctly', function(assert) {
QUnit.test("can add an upload correctly", function(assert) {
let theme = Theme.create();
assert.equal(theme.get("uploads.length"), 0, "uploads should be an empty array");
assert.equal(
theme.get("uploads.length"),
0,
"uploads should be an empty array"
);
theme.setField('common', 'bob', '', 999, 2);
theme.setField("common", "bob", "", 999, 2);
let fields = theme.get("theme_fields");
assert.equal(fields.length, 1, 'expecting 1 theme field');
assert.equal(fields[0].upload_id, 999, 'expecting upload id to be set');
assert.equal(fields[0].type_id, 2, 'expecting type id to be set');
assert.equal(fields.length, 1, "expecting 1 theme field");
assert.equal(fields[0].upload_id, 999, "expecting upload id to be set");
assert.equal(fields[0].type_id, 2, "expecting type id to be set");
assert.equal(theme.get("uploads.length"), 1, "expecting an upload");
});
});