Skip to content

Commit 182302b

Browse files
committed
Updated tests based on feedback
1 parent 64f8578 commit 182302b

File tree

1 file changed

+18
-15
lines changed

1 file changed

+18
-15
lines changed

test/index.js

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,25 @@ const isBoolean = function (value) {
2424
return typeof value === 'boolean';
2525
}
2626

27-
const checkFeature = function (featureName) {
27+
const checkFeature = async function (featureName) {
2828
const feature = features[featureName];
2929
assert(feature, `The feature ${featureName} doesn't exist`);
30-
feature().then(function(result) {
31-
console.log(`The feature ${featureName} returned: ${result}`);
32-
assert(isBoolean(result), `The feature ${featureName} returned: ${result}`);
33-
})
30+
const result = await feature();
31+
console.log(`The feature ${featureName} returned: ${result}`);
32+
assert(isBoolean(result), `The feature ${featureName} returned: ${result}`);
3433
}
3534

36-
checkFeature("bulkMemory");
37-
checkFeature("exceptions");
38-
checkFeature("multiValue");
39-
checkFeature("mutableGlobals");
40-
checkFeature("referenceTypes");
41-
checkFeature("saturatedFloatToInt");
42-
checkFeature("signExtensions");
43-
checkFeature("simd");
44-
checkFeature("tailCall");
45-
checkFeature("threads");
35+
async function run() {
36+
await checkFeature("bulkMemory");
37+
await checkFeature("exceptions");
38+
await checkFeature("multiValue");
39+
await checkFeature("mutableGlobals");
40+
await checkFeature("referenceTypes");
41+
await checkFeature("saturatedFloatToInt");
42+
await checkFeature("signExtensions");
43+
await checkFeature("simd");
44+
await checkFeature("tailCall");
45+
await checkFeature("threads");
46+
}
47+
48+
run();

0 commit comments

Comments
 (0)