Skip to content

Commit ee85301

Browse files
committed
Test: Unnecessary async on basic tests
1 parent 111274d commit ee85301

2 files changed

Lines changed: 11 additions & 35 deletions

File tree

smoke-tests/smoke-test-cjs.cjs

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,11 @@
44
const assert = require('node:assert');
55
const concurrently = require('../index.js');
66

7-
(async () => {
8-
try {
9-
// Assert the functions loaded by checking their names load and types are correct
10-
assert.strictEqual(
11-
typeof concurrently === 'function',
12-
true,
13-
'Expected default to be function',
14-
);
15-
16-
console.info('Imported cjs successfully');
17-
} catch (error) {
18-
console.error(error);
19-
console.debug(error.stack);
20-
21-
// Prevent an unhandled rejection, exit gracefully.
22-
process.exit(1);
23-
}
24-
})();
7+
// Assert the functions loaded by checking their names load and types are correct
8+
assert.strictEqual(
9+
typeof concurrently === 'function',
10+
true,
11+
'Expected default to be function',
12+
);
13+
14+
console.info('Imported cjs successfully');

smoke-tests/smoke-test-esm.mjs

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,7 @@ import assert from 'node:assert';
55

66
import concurrently from '../index.mjs';
77

8-
(async () => {
9-
try {
10-
// Assert the functions loaded by checking their names load and types are correct
11-
assert.strictEqual(
12-
typeof concurrently === 'function',
13-
true,
14-
'Expected default to be function',
15-
);
8+
// Assert the functions loaded by checking their names load and types are correct
9+
assert.strictEqual(typeof concurrently === 'function', true, 'Expected default to be function');
1610

17-
console.info('Imported esm successfully');
18-
} catch (error) {
19-
console.error(error);
20-
console.debug(error.stack);
21-
22-
// Prevent an unhandled rejection, exit gracefully.
23-
process.exit(1);
24-
}
25-
})();
11+
console.info('Imported esm successfully');

0 commit comments

Comments
 (0)