Skip to content

Commit 160a870

Browse files
author
Kamil Sobol
committed
Merge remote-tracking branch 'origin/main' into stocaaro/client-schema/function-runtime-config
2 parents c3d9559 + 9dcd092 commit 160a870

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

packages/backend-function/src/function_env_type_generator.test.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
1-
import { describe, it, mock } from 'node:test';
1+
import { after, describe, it, mock } from 'node:test';
22
import fs from 'fs';
33
import { FunctionEnvironmentTypeGenerator } from './function_env_type_generator.js';
44
import assert from 'assert';
55
import { pathToFileURL } from 'url';
6+
import path from 'path';
67

78
void describe('FunctionEnvironmentTypeGenerator', () => {
9+
after(async () => {
10+
// clean up generated env files
11+
await fsp.rm(path.join(process.cwd(), '.amplify'), {
12+
recursive: true,
13+
force: true,
14+
});
15+
});
16+
817
void it('generates a type definition file', () => {
918
const fsOpenSyncMock = mock.method(fs, 'openSync');
1019
const fsWriteFileSyncMock = mock.method(fs, 'writeFileSync', () => null);

0 commit comments

Comments
 (0)