@@ -34,7 +34,6 @@ import {
34
34
cleanWhiteSpace ,
35
35
p ,
36
36
testRealmURL ,
37
- shimModule ,
38
37
setupCardLogs ,
39
38
saveCard ,
40
39
} from ' ../../helpers' ;
@@ -163,7 +162,7 @@ module('Integration | card-basics', function (hooks) {
163
162
</template >
164
163
};
165
164
}
166
- await shimModule (` ${testRealmURL }test-cards ` , { Post , Person }, loader );
165
+ loader . shimModule (` ${testRealmURL }test-cards ` , { Post , Person });
167
166
168
167
let helloWorld = new Post ({
169
168
title: ' First Post' ,
@@ -413,7 +412,7 @@ module('Integration | card-basics', function (hooks) {
413
412
};
414
413
}
415
414
416
- await shimModule (` ${testRealmURL }test-cards ` , { Guest , Person }, loader );
415
+ loader . shimModule (` ${testRealmURL }test-cards ` , { Guest , Person });
417
416
418
417
let g1 = new Guest ({
419
418
name: ' Madeleine' ,
@@ -470,7 +469,7 @@ module('Integration | card-basics', function (hooks) {
470
469
class Person extends CardDef {
471
470
@field firstName = contains (StringField );
472
471
}
473
- await shimModule (` ${testRealmURL }test-cards ` , { Person }, loader );
472
+ loader . shimModule (` ${testRealmURL }test-cards ` , { Person });
474
473
475
474
// deserialize a card with an ID to mark it as "saved"
476
475
let card = new Person ({ firstName: ' Mango' });
@@ -782,7 +781,7 @@ module('Integration | card-basics', function (hooks) {
782
781
@field firstName = contains (StringField );
783
782
@field pet = linksTo (Pet );
784
783
}
785
- await shimModule (` ${testRealmURL }test-cards ` , { Person , Pet }, loader );
784
+ loader . shimModule (` ${testRealmURL }test-cards ` , { Person , Pet });
786
785
787
786
let mango = new Pet ({
788
787
firstName: ' Mango' ,
@@ -879,7 +878,7 @@ module('Integration | card-basics', function (hooks) {
879
878
@field firstName = contains (StringField );
880
879
@field pets = linksToMany (Pet );
881
880
}
882
- await shimModule (` ${testRealmURL }test-cards ` , { Person , Pet }, loader );
881
+ loader . shimModule (` ${testRealmURL }test-cards ` , { Person , Pet });
883
882
884
883
let mango = new Pet ({
885
884
firstName: ' Mango' ,
@@ -967,7 +966,7 @@ module('Integration | card-basics', function (hooks) {
967
966
// @ts-expect-error Have to purposefully bypass type-checking in order to get into this runtime error state
968
967
@field pet = linksTo (StringField );
969
968
}
970
- await shimModule (` ${testRealmURL }test-cards ` , { Person }, loader );
969
+ loader . shimModule (` ${testRealmURL }test-cards ` , { Person });
971
970
972
971
try {
973
972
new Person ({ firstName: ' Hassan' , pet: ' Mango' });
@@ -1006,11 +1005,7 @@ module('Integration | card-basics', function (hooks) {
1006
1005
@field firstName = contains (StringField );
1007
1006
@field pet = linksTo (Pet );
1008
1007
}
1009
- await shimModule (
1010
- ` ${testRealmURL }test-cards ` ,
1011
- { Person , Pet , NotAPet },
1012
- loader ,
1013
- );
1008
+ loader .shimModule (` ${testRealmURL }test-cards ` , { Person , Pet , NotAPet });
1014
1009
1015
1010
let door = new NotAPet ({ firstName: ' door' });
1016
1011
try {
@@ -1060,7 +1055,7 @@ module('Integration | card-basics', function (hooks) {
1060
1055
</template >
1061
1056
};
1062
1057
}
1063
- await shimModule (` ${testRealmURL }test-cards ` , { Person , Pet }, loader );
1058
+ loader . shimModule (` ${testRealmURL }test-cards ` , { Person , Pet });
1064
1059
1065
1060
let vanGogh = new Pet ({ firstName: ' Van Gogh' });
1066
1061
let mango = new Pet ({ firstName: ' Mango' , friend: vanGogh });
@@ -1149,7 +1144,7 @@ module('Integration | card-basics', function (hooks) {
1149
1144
</template >
1150
1145
};
1151
1146
}
1152
- await shimModule (` ${testRealmURL }test-cards ` , { Post , Person }, loader );
1147
+ loader . shimModule (` ${testRealmURL }test-cards ` , { Post , Person });
1153
1148
1154
1149
let helloWorld = new Post ({
1155
1150
author: new Person ({
@@ -1196,16 +1191,12 @@ module('Integration | card-basics', function (hooks) {
1196
1191
</template >
1197
1192
};
1198
1193
}
1199
- await shimModule (
1200
- ` ${testRealmURL }test-cards ` ,
1201
- {
1202
- Post ,
1203
- Person ,
1204
- TestNumber ,
1205
- TestString ,
1206
- },
1207
- loader ,
1208
- );
1194
+ loader .shimModule (` ${testRealmURL }test-cards ` , {
1195
+ Post ,
1196
+ Person ,
1197
+ TestNumber ,
1198
+ TestString ,
1199
+ });
1209
1200
1210
1201
let helloWorld = new Post ({
1211
1202
author: new Person ({ firstName: ' Arthur' , number: 10 }),
@@ -1234,7 +1225,7 @@ module('Integration | card-basics', function (hooks) {
1234
1225
@field title = contains (title );
1235
1226
@field author = contains (Person );
1236
1227
}
1237
- await shimModule (` ${testRealmURL }test-cards ` , { Post , Person }, loader );
1228
+ loader . shimModule (` ${testRealmURL }test-cards ` , { Post , Person });
1238
1229
1239
1230
let helloWorld = new Post ({
1240
1231
title: ' First Post' ,
@@ -1260,7 +1251,7 @@ module('Integration | card-basics', function (hooks) {
1260
1251
},
1261
1252
});
1262
1253
}
1263
- await shimModule (` ${testRealmURL }test-cards ` , { Person }, loader );
1254
+ loader . shimModule (` ${testRealmURL }test-cards ` , { Person });
1264
1255
let helloWorld = new Person ({
1265
1256
firstName: ' Arthur' ,
1266
1257
lastName: ' M' ,
@@ -1300,7 +1291,7 @@ module('Integration | card-basics', function (hooks) {
1300
1291
</template >
1301
1292
};
1302
1293
}
1303
- await shimModule (` ${testRealmURL }test-cards ` , { Person }, loader );
1294
+ loader . shimModule (` ${testRealmURL }test-cards ` , { Person });
1304
1295
let helloWorld = new Person ({ firstName: ' Arthur' , age: 10 });
1305
1296
1306
1297
await renderCard (loader , helloWorld , ' atom' );
@@ -1376,7 +1367,7 @@ module('Integration | card-basics', function (hooks) {
1376
1367
</template >
1377
1368
};
1378
1369
}
1379
- await shimModule (` ${testRealmURL }test-cards ` , { Family , Person }, loader );
1370
+ loader . shimModule (` ${testRealmURL }test-cards ` , { Family , Person });
1380
1371
1381
1372
let abdelRahmans = new Family ({
1382
1373
people: [
@@ -1452,7 +1443,7 @@ module('Integration | card-basics', function (hooks) {
1452
1443
</template >
1453
1444
};
1454
1445
}
1455
- await shimModule (` ${testRealmURL }test-cards ` , { Family , Person }, loader );
1446
+ loader . shimModule (` ${testRealmURL }test-cards ` , { Family , Person });
1456
1447
1457
1448
let abdelRahmans = new Family ({
1458
1449
people: [
@@ -1498,7 +1489,7 @@ module('Integration | card-basics', function (hooks) {
1498
1489
</template >
1499
1490
};
1500
1491
}
1501
- await shimModule (` ${testRealmURL }test-cards ` , { Family , Person }, loader );
1492
+ loader . shimModule (` ${testRealmURL }test-cards ` , { Family , Person });
1502
1493
let mango = new Person ({
1503
1494
firstName: ' Mango' ,
1504
1495
});
@@ -1559,16 +1550,12 @@ module('Integration | card-basics', function (hooks) {
1559
1550
};
1560
1551
}
1561
1552
1562
- await shimModule (
1563
- ` ${testRealmURL }test-cards ` ,
1564
- {
1565
- Person ,
1566
- Employee ,
1567
- Customer ,
1568
- Group ,
1569
- },
1570
- loader ,
1571
- );
1553
+ loader .shimModule (` ${testRealmURL }test-cards ` , {
1554
+ Person ,
1555
+ Employee ,
1556
+ Customer ,
1557
+ Group ,
1558
+ });
1572
1559
1573
1560
let group = new Group ({
1574
1561
people: [
@@ -1708,7 +1695,7 @@ module('Integration | card-basics', function (hooks) {
1708
1695
@field firstName = contains (StringField );
1709
1696
@field languagesSpoken = containsMany (StringField );
1710
1697
}
1711
- await shimModule (` ${testRealmURL }test-cards ` , { Person }, loader );
1698
+ loader . shimModule (` ${testRealmURL }test-cards ` , { Person });
1712
1699
assert .throws (
1713
1700
() => new Person ({ languagesSpoken: ' english' }),
1714
1701
/ Expected array for field value languagesSpoken/ ,
@@ -1735,7 +1722,7 @@ module('Integration | card-basics', function (hooks) {
1735
1722
@field title = contains (StringField );
1736
1723
@field author = contains (Person );
1737
1724
}
1738
- await shimModule (` ${testRealmURL }test-cards ` , { Post , Person }, loader );
1725
+ loader . shimModule (` ${testRealmURL }test-cards ` , { Post , Person });
1739
1726
1740
1727
let helloWorld = new Post ({
1741
1728
title: ' My Post' ,
@@ -1777,7 +1764,7 @@ module('Integration | card-basics', function (hooks) {
1777
1764
},
1778
1765
});
1779
1766
}
1780
- await shimModule (` ${testRealmURL }test-cards ` , { Person }, loader );
1767
+ loader . shimModule (` ${testRealmURL }test-cards ` , { Person });
1781
1768
1782
1769
let mango = new Person ({ firstName: ' Mango' , isCool: true });
1783
1770
let root = await renderCard (loader , mango , ' isolated' );
@@ -1797,7 +1784,7 @@ module('Integration | card-basics', function (hooks) {
1797
1784
@field isCool = contains (BooleanField );
1798
1785
@field isHuman = contains (BooleanField );
1799
1786
}
1800
- await shimModule (` ${testRealmURL }test-cards ` , { Person }, loader );
1787
+ loader . shimModule (` ${testRealmURL }test-cards ` , { Person });
1801
1788
let mango = new Person ({
1802
1789
firstName: ' Mango' ,
1803
1790
isCool: true ,
@@ -1903,7 +1890,7 @@ module('Integration | card-basics', function (hooks) {
1903
1890
</template >
1904
1891
};
1905
1892
}
1906
- await shimModule (` ${testRealmURL }test-cards ` , { Post , Person }, loader );
1893
+ loader . shimModule (` ${testRealmURL }test-cards ` , { Post , Person });
1907
1894
1908
1895
let helloWorld = new Post ({
1909
1896
title: ' First Post' ,
@@ -2199,11 +2186,7 @@ module('Integration | card-basics', function (hooks) {
2199
2186
@field favoritePlaces = linksToMany (Country );
2200
2187
}
2201
2188
2202
- await shimModule (
2203
- ` ${testRealmURL }test-cards ` ,
2204
- { Country , ContactCard },
2205
- loader ,
2206
- );
2189
+ loader .shimModule (` ${testRealmURL }test-cards ` , { Country , ContactCard });
2207
2190
2208
2191
let us = new Country ({ countryName: ' United States' , flag: ' 🇺🇸' });
2209
2192
let canada = new Country ({ countryName: ' Canada' , flag: ' 🇨🇦' });
0 commit comments