| 14 | const defaultFunctionsDirectory = 'netlify/functions' |
| 15 | |
| 16 | const 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 | |
| 31 | describe.concurrent('commands/init', () => { |
| 32 | test('netlify init existing project', async (t) => { |