Skip to content

Commit

Permalink
test(global-setup): migrate global-setup to TypeScript
Browse files Browse the repository at this point in the history
  • Loading branch information
djcsdy committed Nov 16, 2023
1 parent 48e554b commit 768ce9c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"extends": "@softwareventures/semantic-release-config"
},
"jest": {
"globalSetup": "<rootDir>/test/global-setup.js",
"globalSetup": "<rootDir>/test/global-setup.ts",
"globalTeardown": "<rootDir>/test/global-teardown.ts",
"watchPathIgnorePatterns": [
"<rootDir>/tmp"
Expand Down
4 changes: 2 additions & 2 deletions test/global-setup.js → test/global-setup.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
const mkdirp = require("mkdirp");
import mkdirp = require("mkdirp");

/**
* Create the tmp directory in which our `.git` directory
* under test will live, and all the temp files will be
* created and updated.
*/
module.exports = async () => mkdirp("tmp");
export default async () => mkdirp("tmp");
2 changes: 1 addition & 1 deletion test/global-teardown.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {rimraf} from "rimraf";

/**
* Destroy the tmp directory that was created in global-setup.js
* Destroy the tmp directory that was created in global-setup.ts
*/
export default async () => rimraf("tmp");

0 comments on commit 768ce9c

Please sign in to comment.