Page Contents
Home > @loopback/testlab > TestSandbox > writeJsonFile
TestSandbox.writeJsonFile() method
Creates a new file and writes the given data serialized as JSON.
Signature:
writeJsonFile(dest: string, data: unknown): Promise<void>;
Parameters
| Parameter | Type | Description |
|---|---|---|
|
dest |
string |
Destination filename, optionally including a relative path. |
|
data |
unknown |
The data to write. |
Returns:
Promise<void>