Issues (19)

test/utils/helpers/version.test.js (1 issue)

Labels
Severity
1
import { versionMatch } from '../../../src/utils/helpers/version';
2
3
describe('version', () => {
4
  describe('versionMatch', () => {
5
    it.each([
0 ignored issues
show
The variable it seems to be never declared. If this is a global, consider adding a /** global: it */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
6
      [ undefined, {}, false ],
7
      [ null, {}, false ],
8
      [ '', {}, false ],
9
      [[], {}, false ],
10
      [ '2.8.3', {}, true ],
11
      [ '2.8.3', { minVersion: '2.0.0' }, true ],
12
      [ '2.0.0', { minVersion: '2.0.0' }, true ],
13
      [ '1.8.0', { maxVersion: '1.8.0' }, true ],
14
      [ '1.7.1', { maxVersion: '1.8.0' }, true ],
15
      [ '1.7.3', { minVersion: '1.7.0', maxVersion: '1.8.0' }, true ],
16
      [ '1.8.3', { minVersion: '2.0.0' }, false ],
17
      [ '1.8.3', { maxVersion: '1.8.0' }, false ],
18
      [ '1.8.3', { minVersion: '1.7.0', maxVersion: '1.8.0' }, false ],
19
    ])('properly matches versions based on what is provided', (version, versionConstraints, expected) => {
20
      expect(versionMatch(version, versionConstraints)).toEqual(expected);
21
    });
22
  });
23
});
24