Skip to content

Commit

Permalink
chore(type-utils): fixed TypeOrValueSpecifier tests relativity (#7256)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaKGoldberg committed Jul 17, 2023
1 parent 41d6e9d commit bbde5c9
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions packages/type-utils/tests/TypeOrValueSpecifier.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,42 +196,42 @@ describe('TypeOrValueSpecifier', () => {
],
[
'interface Foo {prop: string}; type Test = Foo;',
{ from: 'file', name: 'Foo', path: 'file.ts' },
{ from: 'file', name: 'Foo', path: 'tests/fixtures/file.ts' },
],
[
'type Foo = {prop: string}; type Test = Foo;',
{ from: 'file', name: 'Foo', path: 'file.ts' },
{ from: 'file', name: 'Foo', path: 'tests/fixtures/file.ts' },
],
[
'interface Foo {prop: string}; type Test = Foo;',
{
from: 'file',
name: 'Foo',
path: './////file.ts',
path: 'tests/../tests/fixtures/////file.ts',
},
],
[
'type Foo = {prop: string}; type Test = Foo;',
{
from: 'file',
name: 'Foo',
path: './////file.ts',
path: 'tests/../tests/fixtures/////file.ts',
},
],
[
'interface Foo {prop: string}; type Test = Foo;',
{
from: 'file',
name: ['Foo', 'Bar'],
path: 'file.ts',
path: 'tests/fixtures/file.ts',
},
],
[
'type Foo = {prop: string}; type Test = Foo;',
{
from: 'file',
name: ['Foo', 'Bar'],
path: 'file.ts',
path: 'tests/fixtures/file.ts',
},
],
])('matches a matching file specifier: %s', runTestPositive);
Expand All @@ -247,14 +247,14 @@ describe('TypeOrValueSpecifier', () => {
],
[
'interface Foo {prop: string}; type Test = Foo;',
{ from: 'file', name: 'Foo', path: 'wrong-file.ts' },
{ from: 'file', name: 'Foo', path: 'tests/fixtures/wrong-file.ts' },
],
[
'interface Foo {prop: string}; type Test = Foo;',
{
from: 'file',
name: ['Foo', 'Bar'],
path: 'wrong-file.ts',
path: 'tests/fixtures/wrong-file.ts',
},
],
])("doesn't match a mismatched file specifier: %s", runTestNegative);
Expand Down Expand Up @@ -399,14 +399,14 @@ describe('TypeOrValueSpecifier', () => {
['type Test = RegExp;', { from: 'file', name: ['RegExp', 'BigInt'] }],
[
'type Test = RegExp;',
{ from: 'file', name: 'RegExp', path: 'file.ts' },
{ from: 'file', name: 'RegExp', path: 'tests/fixtures/file.ts' },
],
[
'type Test = RegExp;',
{
from: 'file',
name: ['RegExp', 'BigInt'],
path: 'file.ts',
path: 'tests/fixtures/file.ts',
},
],
[
Expand Down

0 comments on commit bbde5c9

Please sign in to comment.