Skip to content

Function: seedDirectory()

@termwright/test


@termwright/test / seedDirectory

seedDirectory(directory, options): readonly string[]

Defined in: test/src/seed.ts:54

Creates the declared files inside directory.

A template is copied first and the declared files are written over it, so a test can take a whole project as its starting point and change the one file it is about.

string

SeedOptions

readonly string[]

TypeError when a path would leave directory. A test that writes outside its own directory is not isolated, and ../../.ssh/config is the kind of typo that should stop a run rather than land somewhere real.