Skip to content

Commit e88327d

Browse files
committed
Fix
1 parent ecf2f7f commit e88327d

6 files changed

Lines changed: 12 additions & 9 deletions

File tree

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
"type": "git",
1818
"url": "https://github.com/changesets/ghcommit.git"
1919
},
20-
"type": "module",
2120
"exports": {
2221
".": {
2322
"import": "./dist/index.mjs",

tests/integration/env.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import { pino } from "pino";
22
import { configDotenv } from "dotenv";
33

4-
export const ROOT_TEST_BRANCH_PREFIX = process.env.ROOT_TEST_BRANCH_PREFIX;
5-
export const ROOT_TEMP_DIRECTORY = process.env.ROOT_TEMP_DIRECTORY;
4+
export const ROOT_TEST_BRANCH_PREFIX = process.env
5+
.ROOT_TEST_BRANCH_PREFIX as string;
6+
export const ROOT_TEMP_DIRECTORY = process.env.ROOT_TEMP_DIRECTORY as string;
67

78
configDotenv();
89

tests/integration/git.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const expectBranchHasFile = async ({
2929
oid: string | null;
3030
}) => {
3131
if (oid === null) {
32-
expect(() =>
32+
await expect(() =>
3333
getRefTreeQuery(octokit, {
3434
...REPO,
3535
ref: `refs/heads/${branch}`,

tests/integration/node.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ describe("node", () => {
317317

318318
await waitForGitHubToBeReady();
319319

320-
expect(() =>
320+
await expect(() =>
321321
commitFilesFromBuffers({
322322
octokit,
323323
...REPO,

tests/package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"//": "Temporary until we can set this in the root",
3+
"type": "module"
4+
}

vitest.integration.config.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,13 @@ const ROOT_TEMP_DIRECTORY =
1111
process.env.ROOT_TEMP_DIRECTORY ??
1212
path.join(os.tmpdir(), ROOT_TEST_BRANCH_PREFIX);
1313

14+
process.env.ROOT_TEST_BRANCH_PREFIX = ROOT_TEST_BRANCH_PREFIX;
15+
process.env.ROOT_TEMP_DIRECTORY = ROOT_TEMP_DIRECTORY;
16+
1417
export default defineConfig({
1518
test: {
1619
environment: "node",
1720
globalSetup: ["./tests/integration/globalSetup.ts"],
1821
include: ["tests/integration/**/*.test.ts"],
19-
env: {
20-
ROOT_TEST_BRANCH_PREFIX,
21-
ROOT_TEMP_DIRECTORY,
22-
},
2322
},
2423
});

0 commit comments

Comments
 (0)