MCPcopy Create free account
hub / github.com/netlify/cli / assertNetlifyToml

Function assertNetlifyToml

tests/integration/commands/init/init.test.ts:16–29  ·  view source on GitHub ↗
(
  t: TestContext,
  tomlDir: string,
  { command, functions, publish }: { command: string; functions: string; publish: string },
)

Source from the content-addressed store, hash-verified

14const defaultFunctionsDirectory = 'netlify/functions'
15
16const assertNetlifyToml = async (
17 t: TestContext,
18 tomlDir: string,
19 { command, functions, publish }: { command: string; functions: string; publish: string },
20) => {
21 // assert netlify.toml was created with user inputs
22 const netlifyToml: unknown = toml.parse(await readFile(path.join(tomlDir, '/netlify.toml'), 'utf8'))
23 t.expect(netlifyToml).toEqual(
24 // @ts-expect-error(ndhoule): Don't know what's wrong with this typedef
25 cleanDeep({
26 build: { command, functions, publish },
27 }),
28 )
29}
30
31describe.concurrent('commands/init', () => {
32 test('netlify init existing project', async (t) => {

Callers 1

init.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected