Skip to content
This repository has been archived by the owner on Jan 14, 2020. It is now read-only.

Commit

Permalink
Add documentation for updating test snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-alrek committed Nov 26, 2019
1 parent ca2d05c commit f22a79c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@ require_once(Netflex\SDK::bootstrap);
composer run-script tests
```

## Updating snapshots

When an existing snapshot test has been updated, or its behaviour has been modified, the snapshot will have to be updated to prevent the tests from failing.

To update the snapshots, run the following command.

```bash
composer run-script tests:update-snapshots
```

<hr>

Copyright &copy; 2019 **[Apility AS](https://apility.no)**
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
"spatie/phpunit-snapshot-assertions": "^2.1"
},
"scripts": {
"tests": "vendor/bin/phpunit --testdox --colors=always"
"tests": "vendor/bin/phpunit --testdox --colors=always",
"tests:update-snapshots": "vendor/bin/phpunit --colors=always -d --update-snapshots"
}
}

0 comments on commit f22a79c

Please sign in to comment.