Explorar o código

Added test for relative path as `inputFileName`

sanex %!s(int64=3) %!d(string=hai) anos
pai
achega
4550424033
Modificáronse 1 ficheiros con 18 adicións e 0 borrados
  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', () => {