Skip to content

Commit c70f27b

Browse files
committed
test: fix flaky test
1 parent 8adc3e1 commit c70f27b

1 file changed

Lines changed: 15 additions & 8 deletions

File tree

packages/ts-plugin/e2e-test/file-operation.test.ts

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -115,15 +115,22 @@ test('updating file', async () => {
115115
`);
116116

117117
// Update a.module.css to have a semantic error
118-
await writeFile(
119-
iff.paths['a.module.css'],
120-
dedent`
121-
.a_1 {}
122-
.a-2 {}
123-
`,
124-
);
125118
await tsserver.sendUpdateOpen({
126-
openFiles: [{ file: iff.paths['a.module.css'] }],
119+
changedFiles: [
120+
{
121+
fileName: iff.paths['a.module.css'],
122+
textChanges: [
123+
{
124+
start: { line: 1, offset: 1 },
125+
end: { line: 1, offset: 1 },
126+
newText: dedent`
127+
.a_1 {}
128+
.a-2 {}
129+
`,
130+
},
131+
],
132+
},
133+
],
127134
});
128135

129136
// The diagnostics in a.module.css are updated

0 commit comments

Comments
 (0)