Skip to content

Commit 347af11

Browse files
committed
Remove unnecessary wrapper
1 parent 833ba00 commit 347af11

File tree

1 file changed

+62
-64
lines changed

1 file changed

+62
-64
lines changed

packages/host/tests/unit/realm-paths-test.ts

+62-64
Original file line numberDiff line numberDiff line change
@@ -4,73 +4,71 @@ import { RealmPaths } from '@cardstack/runtime-common';
44

55
module('Unit | RealmPaths', function (hooks) {
66
let realmPaths: RealmPaths;
7-
module('RealmPaths from a URL', function (hooks) {
8-
hooks.beforeEach(function () {
9-
realmPaths = new RealmPaths(new URL('https://cardstack.com/hümans'));
10-
});
7+
hooks.beforeEach(function () {
8+
realmPaths = new RealmPaths(new URL('https://cardstack.com/hümans'));
9+
});
1110

12-
test('#local', function (assert) {
13-
assert.strictEqual(
14-
realmPaths.local(new URL('https://cardstack.com/hümans/example')),
15-
'example',
16-
);
17-
assert.strictEqual(
18-
realmPaths.local(new URL('https://cardstack.com/hümans/éxample')),
19-
'éxample',
20-
);
21-
assert.strictEqual(
22-
realmPaths.local(
23-
new URL('https://cardstack.com/hümans/éxample?stripped=true'),
24-
),
25-
'éxample',
26-
);
27-
assert.strictEqual(
28-
realmPaths.local(
29-
new URL('https://cardstack.com/hümans/éxample?stripped=ü'),
30-
{
31-
preserveQuerystring: true,
32-
},
33-
),
34-
'éxample?stripped=ü',
35-
);
36-
});
11+
test('#local', function (assert) {
12+
assert.strictEqual(
13+
realmPaths.local(new URL('https://cardstack.com/hümans/example')),
14+
'example',
15+
);
16+
assert.strictEqual(
17+
realmPaths.local(new URL('https://cardstack.com/hümans/éxample')),
18+
'éxample',
19+
);
20+
assert.strictEqual(
21+
realmPaths.local(
22+
new URL('https://cardstack.com/hümans/éxample?stripped=true'),
23+
),
24+
'éxample',
25+
);
26+
assert.strictEqual(
27+
realmPaths.local(
28+
new URL('https://cardstack.com/hümans/éxample?stripped=ü'),
29+
{
30+
preserveQuerystring: true,
31+
},
32+
),
33+
'éxample?stripped=ü',
34+
);
35+
});
3736

38-
test('#fileURL', function (assert) {
39-
assert.strictEqual(
40-
realmPaths.fileURL('example').href,
41-
'https://cardstack.com/h%C3%BCmans/example',
42-
);
43-
assert.strictEqual(
44-
realmPaths.fileURL('éxample').href,
45-
'https://cardstack.com/h%C3%BCmans/%C3%A9xample',
46-
);
47-
});
37+
test('#fileURL', function (assert) {
38+
assert.strictEqual(
39+
realmPaths.fileURL('example').href,
40+
'https://cardstack.com/h%C3%BCmans/example',
41+
);
42+
assert.strictEqual(
43+
realmPaths.fileURL('éxample').href,
44+
'https://cardstack.com/h%C3%BCmans/%C3%A9xample',
45+
);
46+
});
4847

49-
test('#directoryURL', function (assert) {
50-
assert.strictEqual(
51-
realmPaths.directoryURL('').href,
52-
'https://cardstack.com/h%C3%BCmans/',
53-
);
54-
assert.strictEqual(
55-
realmPaths.directoryURL('example').href,
56-
'https://cardstack.com/h%C3%BCmans/example/',
57-
);
58-
assert.strictEqual(
59-
realmPaths.directoryURL('éxample').href,
60-
'https://cardstack.com/h%C3%BCmans/%C3%A9xample/',
61-
);
62-
});
48+
test('#directoryURL', function (assert) {
49+
assert.strictEqual(
50+
realmPaths.directoryURL('').href,
51+
'https://cardstack.com/h%C3%BCmans/',
52+
);
53+
assert.strictEqual(
54+
realmPaths.directoryURL('example').href,
55+
'https://cardstack.com/h%C3%BCmans/example/',
56+
);
57+
assert.strictEqual(
58+
realmPaths.directoryURL('éxample').href,
59+
'https://cardstack.com/h%C3%BCmans/%C3%A9xample/',
60+
);
61+
});
6362

64-
test('#inRealm', function (assert) {
65-
assert.true(
66-
realmPaths.inRealm(new URL('https://cardstack.com/hümans/example')),
67-
);
68-
assert.true(
69-
realmPaths.inRealm(new URL('https://cardstack.com/hümans/éxample')),
70-
);
71-
assert.false(
72-
realmPaths.inRealm(new URL('https://cardstack.com/humans/éxample')),
73-
);
74-
});
63+
test('#inRealm', function (assert) {
64+
assert.true(
65+
realmPaths.inRealm(new URL('https://cardstack.com/hümans/example')),
66+
);
67+
assert.true(
68+
realmPaths.inRealm(new URL('https://cardstack.com/hümans/éxample')),
69+
);
70+
assert.false(
71+
realmPaths.inRealm(new URL('https://cardstack.com/humans/éxample')),
72+
);
7573
});
7674
});

0 commit comments

Comments
 (0)