|
| 1 | +/** |
| 2 | + * @file Unit Tests - EXT_DTS_REGEX |
| 3 | + * @module ext-regex/regex/tests/unit/dts |
| 4 | + */ |
| 5 | + |
| 6 | +import TEST_SUBJECT from '../dts' |
| 7 | + |
| 8 | +describe('unit:EXT_DTS_REGEX', () => { |
| 9 | + describe('.d.cts', () => { |
| 10 | + it('should match extension ".d.cts"', () => { |
| 11 | + expect(TEST_SUBJECT.exec('.d.cts')).toMatchSnapshot() |
| 12 | + }) |
| 13 | + |
| 14 | + it('should match module id given last extension is ".d.cts"', () => { |
| 15 | + expect(TEST_SUBJECT.exec('dist/users.controller.d.cts')).toMatchSnapshot() |
| 16 | + }) |
| 17 | + |
| 18 | + it('should match module id given only extension is ".d.cts"', () => { |
| 19 | + expect(TEST_SUBJECT.exec('dist/index.d.cts')).toMatchSnapshot() |
| 20 | + }) |
| 21 | + }) |
| 22 | + |
| 23 | + describe('.d.mts', () => { |
| 24 | + it('should match extension ".d.mts"', () => { |
| 25 | + expect(TEST_SUBJECT.exec('.d.mts')).toMatchSnapshot() |
| 26 | + }) |
| 27 | + |
| 28 | + it('should match module id given last extension is ".d.mts"', () => { |
| 29 | + expect(TEST_SUBJECT.exec('dist/users.controller.d.mts')).toMatchSnapshot() |
| 30 | + }) |
| 31 | + |
| 32 | + it('should match module id given only extension is ".d.mts"', () => { |
| 33 | + expect(TEST_SUBJECT.exec('dist/index.d.mts')).toMatchSnapshot() |
| 34 | + }) |
| 35 | + }) |
| 36 | + |
| 37 | + describe('.d.ts', () => { |
| 38 | + it('should match extension ".d.ts"', () => { |
| 39 | + expect(TEST_SUBJECT.exec('.d.ts')).toMatchSnapshot() |
| 40 | + }) |
| 41 | + |
| 42 | + it('should match module id given last extension is ".d.ts"', () => { |
| 43 | + expect(TEST_SUBJECT.exec('dist/users.controller.d.ts')).toMatchSnapshot() |
| 44 | + }) |
| 45 | + |
| 46 | + it('should match module id given only extension is ".d.ts"', () => { |
| 47 | + expect(TEST_SUBJECT.exec('dist/index.d.ts')).toMatchSnapshot() |
| 48 | + }) |
| 49 | + }) |
| 50 | +}) |
0 commit comments