Skip to content

Commit

Permalink
test: refactor to use named configs
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Feb 14, 2024
1 parent b114398 commit 329b6f8
Show file tree
Hide file tree
Showing 10 changed files with 6 additions and 3 deletions.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion test/fixture/_github/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"name": "c12-github-layer",
"version": "0.0.0",
"exports": {
".": "./config.ts"
".": "./test.config.ts"
}
}
File renamed without changes.
2 changes: 1 addition & 1 deletion test/fixture/node_modules/c12-npm-test/package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
2 changes: 1 addition & 1 deletion test/fixture/config.ts → test/fixture/test.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
["gh:unjs/c12/test/fixture/_github#main", { giget: {} }],
],
$test: {
extends: ["./config.dev"],
extends: ["./test.config.dev"],
envConfig: true,
},
colors: {
Expand Down
File renamed without changes.
3 changes: 3 additions & 0 deletions test/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ describe("c12", () => {
}>;
const { config, layers } = await loadConfig<UserConfig>({
cwd: r("./fixture"),
name: "test",
dotenv: true,
packageJson: ["c12", "c12-alt"],
globalRc: true,
Expand Down Expand Up @@ -218,6 +219,7 @@ describe("c12", () => {

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

it("omit$Keys", async () => {
const { config, layers } = await loadConfig({
name: "test",
cwd: r("./fixture"),
envName: "test",
omit$Keys: true,
Expand Down

0 comments on commit 329b6f8

Please sign in to comment.