Skip to content

Commit 329b6f8

Browse files
committed
test: refactor to use named configs
1 parent b114398 commit 329b6f8

File tree

10 files changed

+6
-3
lines changed

10 files changed

+6
-3
lines changed
File renamed without changes.
File renamed without changes.

test/fixture/_github/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
"name": "c12-github-layer",
33
"version": "0.0.0",
44
"exports": {
5-
".": "./config.ts"
5+
".": "./test.config.ts"
66
}
77
}
File renamed without changes.

test/fixture/node_modules/c12-npm-test/package.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
File renamed without changes.

test/fixture/config.ts test/fixture/test.config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default {
55
["gh:unjs/c12/test/fixture/_github#main", { giget: {} }],
66
],
77
$test: {
8-
extends: ["./config.dev"],
8+
extends: ["./test.config.dev"],
99
envConfig: true,
1010
},
1111
colors: {
File renamed without changes.

test/index.test.ts

+3
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ describe("c12", () => {
1919
}>;
2020
const { config, layers } = await loadConfig<UserConfig>({
2121
cwd: r("./fixture"),
22+
name: "test",
2223
dotenv: true,
2324
packageJson: ["c12", "c12-alt"],
2425
globalRc: true,
@@ -218,6 +219,7 @@ describe("c12", () => {
218219

219220
it("extend from git repo", async () => {
220221
const { config } = await loadConfig({
222+
name: "test",
221223
cwd: r("./fixture/new_dir"),
222224
overrides: {
223225
extends: ["github:unjs/c12/test/fixture"],
@@ -251,6 +253,7 @@ describe("c12", () => {
251253

252254
it("omit$Keys", async () => {
253255
const { config, layers } = await loadConfig({
256+
name: "test",
254257
cwd: r("./fixture"),
255258
envName: "test",
256259
omit$Keys: true,

0 commit comments

Comments
 (0)