Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dzonatan committed Apr 3, 2017
1 parent 528312a commit 7b50c0a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
16 changes: 8 additions & 8 deletions test/providers/angular-html-definition-provider.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,55 +16,55 @@ suite('AngularHtmlDefinitionProvider', () => {
const expectedFile = workspaceFilePath('foo.component.ts');
const expectedPosition = new vscode.Position(6, 2);

assertGoToDefinition(templateFilePath, inputPosition, expectedFile, expectedPosition);
await assertGoToDefinition(templateFilePath, inputPosition, expectedFile, expectedPosition);
});

test('from interpolation with pipe', async () => {
const inputPosition = new vscode.Position(6, 9);
const expectedFile = workspaceFilePath('foo.component.ts');
const expectedPosition = new vscode.Position(6, 2);

assertGoToDefinition(templateFilePath, inputPosition, expectedFile, expectedPosition);
await assertGoToDefinition(templateFilePath, inputPosition, expectedFile, expectedPosition);
});

test('from interpolation with elvis operator', async () => {
const inputPosition = new vscode.Position(8, 8);
const expectedFile = workspaceFilePath('foo.component.ts');
const expectedPosition = new vscode.Position(20, 2);

assertGoToDefinition(templateFilePath, inputPosition, expectedFile, expectedPosition);
await assertGoToDefinition(templateFilePath, inputPosition, expectedFile, expectedPosition);
});

test('from one way binded input attribute', async () => {
const inputPosition = new vscode.Position(2, 40);
const expectedFile = workspaceFilePath('foo.component.ts');
const expectedPosition = new vscode.Position(11, 6);

assertGoToDefinition(templateFilePath, inputPosition, expectedFile, expectedPosition);
await assertGoToDefinition(templateFilePath, inputPosition, expectedFile, expectedPosition);
});

test('from two way binded input attribute', async () => {
const inputPosition = new vscode.Position(2, 62);
const expectedFile = workspaceFilePath('foo.component.ts');
const expectedPosition = new vscode.Position(7, 11);

assertGoToDefinition(templateFilePath, inputPosition, expectedFile, expectedPosition);
await assertGoToDefinition(templateFilePath, inputPosition, expectedFile, expectedPosition);
});

test('from output attribute', async () => {
const inputPosition = new vscode.Position(2, 86);
const expectedFile = workspaceFilePath('foo.component.ts');
const expectedPosition = new vscode.Position(15, 2);

assertGoToDefinition(templateFilePath, inputPosition, expectedFile, expectedPosition);
await assertGoToDefinition(templateFilePath, inputPosition, expectedFile, expectedPosition);
});

test('from structural attribute', async () => {
const inputPosition = new vscode.Position(4, 15);
const expectedFile = workspaceFilePath('foo.component.ts');
const expectedPosition = new vscode.Position(19, 2);

assertGoToDefinition(templateFilePath, inputPosition, expectedFile, expectedPosition);
await assertGoToDefinition(templateFilePath, inputPosition, expectedFile, expectedPosition);
});
});

Expand All @@ -73,6 +73,6 @@ suite('AngularHtmlDefinitionProvider', () => {
const expectedFile = workspaceFilePath('foo.component.ts');
const expectedPosition = new vscode.Position(9, 21);

assertGoToDefinition(templateFilePath, inputPosition, expectedFile, expectedPosition);
await assertGoToDefinition(templateFilePath, inputPosition, expectedFile, expectedPosition);
});
});
4 changes: 2 additions & 2 deletions test/providers/angular-ts-definition-provider.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ suite('AngularTsDefinitionProvider', () => {
const expectedFile = workspaceFilePath('foo.component.html');
const expectedPosition = new vscode.Position(0, 0);

assertGoToDefinition(componentFilePath, inputPosition, expectedFile, expectedPosition);
await assertGoToDefinition(componentFilePath, inputPosition, expectedFile, expectedPosition);
});

test('should go to styleUrls declaration', async () => {
const inputPosition = new vscode.Position(3, 22);
const expectedFile = workspaceFilePath('foo.component.css');
const expectedPosition = new vscode.Position(0, 0);

assertGoToDefinition(componentFilePath, inputPosition, expectedFile, expectedPosition);
await assertGoToDefinition(componentFilePath, inputPosition, expectedFile, expectedPosition);
});
});

0 comments on commit 7b50c0a

Please sign in to comment.