diff --git a/README.md b/README.md index 0ea1ec8..cd0d846 100644 --- a/README.md +++ b/README.md @@ -36,17 +36,17 @@ Add the following to your `jest.config.js` file: Airtable scripts are always run within the context of a base. To test your scripts locally, you will need to generate an object that stores all the tables, fields, views, and records in your base. You can do this by using the [Test Fixture Generator extension](https://airtable.com/marketplace/blk5qI32GYyYb1Rbm/test-fixture-generator). > [!IMPORTANT] -> The Test Fixture Generator extension **has a bug** that means you need to edit the output and can't just paste it into a new file. +> The Test Fixture Generator extension assumes you are generating code for testing within an Airtable extension. You will need to change the output before importing it into your test. -To fix the file generated by the Test Fixture Generator extension, you need to remove the `mockSdkWithFixtureData` function and export the fixture data object directly: +To fix the file generated by the Test Fixture Generator extension, you need to remove the `TestDriver` class and export the fixture data object directly: ```js import { FieldType, ViewType } from '@airtable/blocks/models' -import { mockSdkWithFixtureData } from '@airtable/blocks/testing' -export default mockSdkWithFixtureData({ ...data }) +import TestDriver from '@airtable/blocks-testing' +export default new TestDriver({ ...data }) ``` -Remove all references to `mockSdkWithFixtureData` so that you just export the fixture data object: +Remove all references to `TestDriver` so that you just export the fixture data object: ```js import { FieldType, ViewType } from '@airtable/blocks/models'