Skip to content

Commit cb8414d

Browse files
committed
Update assertion for promises
1 parent 0f0e186 commit cb8414d

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

test/index.test.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ describe('Parse SemVer', () => {
7171
describe('Compare SemVer (async)', () => {
7272
const func = promises.compareSemVer;
7373
it('should be function', () => {
74-
assert.typeOf(func, 'function');
74+
assert.strictEqual(typeof func, 'function');
7575
});
7676

7777
it('should throw', async () => {
@@ -91,7 +91,7 @@ describe('Compare SemVer (async)', () => {
9191
describe('Is Valid SemVer String (async)', () => {
9292
const func = promises.isValidSemVer;
9393
it('should be function', () => {
94-
assert.typeOf(func, 'function');
94+
assert.strictEqual(typeof func, 'function');
9595
});
9696

9797
it('should throw', async () => {
@@ -116,7 +116,7 @@ describe('Is Valid SemVer String (async)', () => {
116116
describe('Parse SemVer String (async)', () => {
117117
const func = promises.parseSemVer;
118118
it('should be function', () => {
119-
assert.typeOf(func, 'function');
119+
assert.strictEqual(typeof func, 'function');
120120
});
121121

122122
it('should throw', async () => {

test/semver.test.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -768,15 +768,15 @@ describe('promises', () => {
768768
it('should be functions', () => {
769769
const keys = Object.keys(promises);
770770
for (const key of keys) {
771-
assert.typeOf(promises[key], 'function');
771+
assert.strictEqual(typeof promises[key], 'function');
772772
}
773773
});
774774
});
775775

776776
describe('Compare SemVer (async)', () => {
777777
const func = promises.compareSemVer;
778778
it('should be function', () => {
779-
assert.typeOf(func, 'function');
779+
assert.strictEqual(typeof func, 'function');
780780
});
781781

782782
it('should throw', async () => {
@@ -812,7 +812,7 @@ describe('Compare SemVer (async)', () => {
812812
describe('Is Valid SemVer String (async)', () => {
813813
const func = promises.isValidSemVer;
814814
it('should be function', () => {
815-
assert.typeOf(func, 'function');
815+
assert.strictEqual(typeof func, 'function');
816816
});
817817

818818
it('should throw', async () => {
@@ -837,7 +837,7 @@ describe('Is Valid SemVer String (async)', () => {
837837
describe('Parse SemVer String (async)', () => {
838838
const func = promises.parseSemVer;
839839
it('should be function', () => {
840-
assert.typeOf(func, 'function');
840+
assert.strictEqual(typeof func, 'function');
841841
});
842842

843843
it('should throw', async () => {

0 commit comments

Comments
 (0)