Skip to content

Commit

Permalink
Test: Unnecessary async on basic tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Codex- committed Sep 19, 2023
1 parent 111274d commit 0de1d19
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 35 deletions.
26 changes: 8 additions & 18 deletions smoke-tests/smoke-test-cjs.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,11 @@
const assert = require('node:assert');
const concurrently = require('../index.js');

(async () => {
try {
// Assert the functions loaded by checking their names load and types are correct
assert.strictEqual(
typeof concurrently === 'function',
true,
'Expected default to be function',
);

console.info('Imported cjs successfully');
} catch (error) {
console.error(error);
console.debug(error.stack);

// Prevent an unhandled rejection, exit gracefully.
process.exit(1);
}
})();
// Assert the functions loaded by checking their names load and types are correct
assert.strictEqual(
typeof concurrently === 'function',
true,
'Expected default to be function',
);

console.info('Imported cjs successfully');
20 changes: 3 additions & 17 deletions smoke-tests/smoke-test-esm.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,7 @@ import assert from 'node:assert';

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

(async () => {
try {
// Assert the functions loaded by checking their names load and types are correct
assert.strictEqual(
typeof concurrently === 'function',
true,
'Expected default to be function',
);
// Assert the functions loaded by checking their names load and types are correct
assert.strictEqual(typeof concurrently === 'function', true, 'Expected default to be function');

console.info('Imported esm successfully');
} catch (error) {
console.error(error);
console.debug(error.stack);

// Prevent an unhandled rejection, exit gracefully.
process.exit(1);
}
})();
console.info('Imported esm successfully');

0 comments on commit 0de1d19

Please sign in to comment.