Skip to content

Commit

Permalink
Uncomment line (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
mosuem authored Jan 26, 2023
1 parent 71ce71e commit 15008e7
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/test/suite/extension.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,19 @@ const annotationNames = new Map<vscode.TextEditorDecorationType, string>([
suite('Extension Test Suite', async () => {
test("should annotate function with parameters", async () => {
const contentWithAnnotations = await buildContentWithAnnotations('testarb.arb');
// const goldenEditor = await getEditor('testarb.annotated');
const goldenEditor = await getEditor('testarb.annotated');
assert.equal(contentWithAnnotations, goldenEditor.document.getText());

// assert.equal(contentWithAnnotations, goldenEditor.document.getText());
await regenerateGolden(contentWithAnnotations);
// Uncomment this line to regenerate the golden test file
// await regenerateGolden(contentWithAnnotations, 'testarb.annotated');
});
});


const testFolderLocation: string = "/../../../src/test/";

async function regenerateGolden(contentWithAnnotations: string) {
const uri = vscode.Uri.file(path.join(__dirname, testFolderLocation, 'testarb.annotated'));
async function regenerateGolden(contentWithAnnotations: string, goldenFilename: string) {
const uri = vscode.Uri.file(path.join(__dirname, testFolderLocation, goldenFilename));
await vscode.workspace.fs.writeFile(uri, new TextEncoder().encode(contentWithAnnotations));
}

Expand Down

0 comments on commit 15008e7

Please sign in to comment.