|
1 | 1 | 'use strict'; |
2 | 2 |
|
3 | | -const hasLockfile = require('./'); |
| 3 | +const hasLockfile = require('.'); |
4 | 4 |
|
5 | | -describe('output', () => { |
6 | | - test('no lockfiles', () => { |
7 | | - expect(hasLockfile()).toBe(false); |
8 | | - expect(hasLockfile.lockfiles()).toEqual([]); |
9 | | - }); |
| 5 | +test('no lockfiles', () => { |
| 6 | + expect(hasLockfile()).toBe(false); |
| 7 | + expect(hasLockfile.lockfiles()).toEqual([]); |
| 8 | +}); |
10 | 9 |
|
11 | | - test('package-lock.json', () => { |
12 | | - expect(hasLockfile('fixtures/bar')).toBe(true); |
13 | | - expect(hasLockfile.lockfiles('fixtures/bar')).toEqual([ |
14 | | - 'package-lock.json', |
15 | | - ]); |
16 | | - }); |
| 10 | +test('package-lock.json', () => { |
| 11 | + expect(hasLockfile('fixtures/bar')).toBe(true); |
| 12 | + expect(hasLockfile.lockfiles('fixtures/bar')).toEqual(['package-lock.json']); |
| 13 | +}); |
17 | 14 |
|
18 | | - test('yarn.lock', () => { |
19 | | - expect(hasLockfile('fixtures/baz')).toBe(true); |
20 | | - expect(hasLockfile.lockfiles('fixtures/baz')).toEqual(['yarn.lock']); |
21 | | - }); |
| 15 | +test('yarn.lock', () => { |
| 16 | + expect(hasLockfile('fixtures/baz')).toBe(true); |
| 17 | + expect(hasLockfile.lockfiles('fixtures/baz')).toEqual(['yarn.lock']); |
| 18 | +}); |
22 | 19 |
|
23 | | - test('npm-shrinkwrap.json', () => { |
24 | | - expect(hasLockfile('fixtures/foo')).toBe(true); |
25 | | - expect(hasLockfile.lockfiles('fixtures/foo')).toEqual([ |
26 | | - 'npm-shrinkwrap.json', |
27 | | - ]); |
28 | | - }); |
| 20 | +test('npm-shrinkwrap.json', () => { |
| 21 | + expect(hasLockfile('fixtures/foo')).toBe(true); |
| 22 | + expect(hasLockfile.lockfiles('fixtures/foo')).toEqual([ |
| 23 | + 'npm-shrinkwrap.json', |
| 24 | + ]); |
| 25 | +}); |
29 | 26 |
|
30 | | - test('all lockfiles', () => { |
31 | | - expect(hasLockfile('fixtures/qux')).toBe(true); |
32 | | - expect(hasLockfile.lockfiles('fixtures/qux')).toEqual([ |
33 | | - 'package-lock.json', |
34 | | - 'yarn.lock', |
35 | | - 'npm-shrinkwrap.json', |
36 | | - ]); |
37 | | - }); |
| 27 | +test('all lockfiles', () => { |
| 28 | + expect(hasLockfile('fixtures/qux')).toBe(true); |
| 29 | + expect(hasLockfile.lockfiles('fixtures/qux')).toEqual([ |
| 30 | + 'package-lock.json', |
| 31 | + 'yarn.lock', |
| 32 | + 'npm-shrinkwrap.json', |
| 33 | + ]); |
38 | 34 | }); |
0 commit comments