Skip to content

Commit

Permalink
Reinstate acceptance tests (gts) (#788)
Browse files Browse the repository at this point in the history
  • Loading branch information
machty authored Jan 10, 2025
1 parent 37ba065 commit b524d61
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 17 deletions.
4 changes: 2 additions & 2 deletions packages/core/__tests__/language-server/diagnostics.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ describe('Language Server: Diagnostics', () => {
expect(diagnostics).toMatchObject([
{
message: "Property 'foo' does not exist on type '{}'.",
source: 'ts',
source: 'glint',
code: 2339,
},
]);
Expand Down Expand Up @@ -165,7 +165,7 @@ describe('Language Server: Diagnostics', () => {
expect(diagnostics).toMatchObject([
{
message: "Property 'foo' does not exist on type '{}'.",
source: 'ts',
source: 'glint',
code: 2339,
},
]);
Expand Down
5 changes: 0 additions & 5 deletions packages/vscode/__fixtures__/custom-app/src/index.custom

This file was deleted.

4 changes: 2 additions & 2 deletions packages/vscode/__tests__/smoketest-ember.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ describe.skip('Smoke test: Ember', () => {
expect(languages.getDiagnostics(templateURI)).toMatchObject([
{
message: "Property 'message' does not exist on type 'ColocatedLayoutComponent'.",
source: 'ts',
source: 'glint',
code: 2339,
range: new Range(0, 7, 0, 14),
},
Expand All @@ -77,7 +77,7 @@ describe.skip('Smoke test: Ember', () => {
expect(languages.getDiagnostics(scriptURI)).toMatchObject([
{
message: "Property 'foo' does not exist on type 'MyTestContext'.",
source: 'ts',
source: 'glint',
code: 2339,
range: new Range(17, 13, 17, 16),
},
Expand Down
20 changes: 12 additions & 8 deletions packages/vscode/__tests__/smoketest-template-imports.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { describe, afterEach, test } from 'mocha';
import { expect } from 'expect';
import { waitUntil } from './helpers/async';

describe.skip('Smoke test: ETI Environment', () => {
describe('Smoke test: ETI Environment', () => {
const rootDir = path.resolve(__dirname, '../../__fixtures__/template-imports-app');

afterEach(async () => {
Expand Down Expand Up @@ -44,7 +44,7 @@ describe.skip('Smoke test: ETI Environment', () => {
expect(languages.getDiagnostics(scriptURI)).toMatchObject([
{
message: "Type 'number' is not assignable to type 'string'.",
source: 'ts',
source: 'glint',
code: 2322,
range: new Range(6, 13, 6, 19),
},
Expand Down Expand Up @@ -75,12 +75,14 @@ describe.skip('Smoke test: ETI Environment', () => {
new Range(new Position(10, 9), new Position(10, 9)),
);

expect(fixes.length).toBe(3);
expect(fixes.length).toBe(4);

expect(fixes[1].title).toBe(`Declare property 'undocumentedProperty'`);
const fix = fixes.find((fix) => fix.title === "Declare property 'undocumentedProperty'");

expect(fix).toBeDefined();

// apply the missing arg fix
await workspace.applyEdit(fixes![1].edit!);
await workspace.applyEdit(fix!.edit!);

await waitUntil(
() =>
Expand Down Expand Up @@ -113,12 +115,14 @@ describe.skip('Smoke test: ETI Environment', () => {
new Range(new Position(10, 12), new Position(10, 12)),
);

expect(fixes.length).toBe(3);
expect(fixes.length).toBe(4);

const fix = fixes.find((fix) => fix.title === "Declare property 'localProp'");

expect(fixes[1].title).toBe(`Declare property 'localProp'`);
expect(fix).toBeDefined();

// select ignore
await workspace.applyEdit(fixes![0].edit!);
await workspace.applyEdit(fix!.edit!);

await waitUntil(
() =>
Expand Down

0 comments on commit b524d61

Please sign in to comment.