소스 검색

Added test for relative path as `inputFileName`

sanex 3 년 전
부모
커밋
4550424033
1개의 변경된 파일18개의 추가작업 그리고 0개의 파일을 삭제
  1. 18 0
      test/functional-tests/options/OptionsNormalizer.spec.ts

+ 18 - 0
test/functional-tests/options/OptionsNormalizer.spec.ts

@@ -301,6 +301,24 @@ describe('OptionsNormalizer', () => {
                     assert.deepEqual(optionsPreset, expectedOptionsPreset);
                 });
             });
+
+            describe('Variant #5: relative path', () => {
+                before(() => {
+                    optionsPreset = getNormalizedOptions({
+                        ...getDefaultOptions(),
+                        inputFileName: 'baz/bar/foo.js'
+                    });
+
+                    expectedOptionsPreset = {
+                        ...getDefaultOptions(),
+                        inputFileName: 'baz/bar/foo.js'
+                    };
+                });
+
+                it('should normalize options preset', () => {
+                    assert.deepEqual(optionsPreset, expectedOptionsPreset);
+                });
+            });
         });
 
         describe('identifierNamesCacheRule', () => {