test: reorder hashline config test for beta merge
This commit is contained in:
parent
a6f802d7fe
commit
3026a005b6
1 changed files with 22 additions and 22 deletions
|
|
@ -56,28 +56,6 @@ test("loads JSON config file", async () => {
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
test("parses experimental.hashline_edit and experimental.hashline_autocorrect", async () => {
|
|
||||||
await using tmp = await tmpdir({
|
|
||||||
init: async (dir) => {
|
|
||||||
await writeConfig(dir, {
|
|
||||||
$schema: "https://opencode.ai/config.json",
|
|
||||||
experimental: {
|
|
||||||
hashline_edit: true,
|
|
||||||
hashline_autocorrect: true,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
},
|
|
||||||
})
|
|
||||||
await Instance.provide({
|
|
||||||
directory: tmp.path,
|
|
||||||
fn: async () => {
|
|
||||||
const config = await Config.get()
|
|
||||||
expect(config.experimental?.hashline_edit).toBe(true)
|
|
||||||
expect(config.experimental?.hashline_autocorrect).toBe(true)
|
|
||||||
},
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
test("loads JSONC config file", async () => {
|
test("loads JSONC config file", async () => {
|
||||||
await using tmp = await tmpdir({
|
await using tmp = await tmpdir({
|
||||||
init: async (dir) => {
|
init: async (dir) => {
|
||||||
|
|
@ -102,6 +80,28 @@ test("loads JSONC config file", async () => {
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
test("parses experimental.hashline_edit and experimental.hashline_autocorrect", async () => {
|
||||||
|
await using tmp = await tmpdir({
|
||||||
|
init: async (dir) => {
|
||||||
|
await writeConfig(dir, {
|
||||||
|
$schema: "https://opencode.ai/config.json",
|
||||||
|
experimental: {
|
||||||
|
hashline_edit: true,
|
||||||
|
hashline_autocorrect: true,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
},
|
||||||
|
})
|
||||||
|
await Instance.provide({
|
||||||
|
directory: tmp.path,
|
||||||
|
fn: async () => {
|
||||||
|
const config = await Config.get()
|
||||||
|
expect(config.experimental?.hashline_edit).toBe(true)
|
||||||
|
expect(config.experimental?.hashline_autocorrect).toBe(true)
|
||||||
|
},
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
test("merges multiple config files with correct precedence", async () => {
|
test("merges multiple config files with correct precedence", async () => {
|
||||||
await using tmp = await tmpdir({
|
await using tmp = await tmpdir({
|
||||||
init: async (dir) => {
|
init: async (dir) => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue