Skip to content

Commit 436a16b

Browse files
committed
test: persist modified settings
1 parent 12f8a9a commit 436a16b

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

src/settings.test.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import settings from "./settings";
2+
import { strict as assert } from "assert";
3+
4+
describe("settings", () => {
5+
let _regex: string;
6+
beforeEach(() => {
7+
_regex = settings.REGEX_FLAGS;
8+
assert(settings.REGEX_FLAGS !== "v");
9+
settings.REGEX_FLAGS = "v";
10+
});
11+
12+
it("should store modifications", async () => {
13+
const { default: settings } = require("./settings");
14+
15+
assert.equal(settings.REGEX_FLAGS, "v");
16+
});
17+
18+
afterEach(() => {
19+
settings.REGEX_FLAGS = _regex;
20+
});
21+
});

0 commit comments

Comments
 (0)