mirror of
https://github.com/datashard/snapshot.git
synced 2024-11-21 13:42:28 +00:00
rename Env Variables
This commit is contained in:
parent
5db74ebcb6
commit
9a41366c82
2 changed files with 4 additions and 4 deletions
|
@ -2,7 +2,7 @@
|
|||
/* global cy */
|
||||
describe("datashard/snapshot", () => {
|
||||
context("simple types"
|
||||
// , { env: { SNAPSHOT_UPDATE: true } }
|
||||
// , { env: { updateSnapshots: true } }
|
||||
, () => {
|
||||
it("works with objects", () => {
|
||||
cy.wrap({
|
||||
|
@ -29,7 +29,7 @@ describe("datashard/snapshot", () => {
|
|||
"works with arrays",
|
||||
{
|
||||
env: {
|
||||
SNAPSHOT_UPDATE: true,
|
||||
updateSnapshots: true,
|
||||
},
|
||||
},
|
||||
() => {
|
||||
|
|
|
@ -12,7 +12,7 @@ const pickSerializer = (asJson, value) => {
|
|||
};
|
||||
|
||||
const store_snapshot = (props = { value, name, raiser }) => {
|
||||
if (Cypress.env().SNAPSHOT_UPDATE || Cypress.config('snapshot').SNAPSHOT_UPDATE) {
|
||||
if (Cypress.env().updateSnapshots || Cypress.config('snapshot').updateSnapshots) {
|
||||
cy.log(props.name)
|
||||
console.log(props.name)
|
||||
cy.writeFile(`${props.name}.json`, JSON.stringify(props.value, null, 2))
|
||||
|
@ -39,7 +39,7 @@ const set_snapshot = ({ snapshotName, serialized, value }) => {
|
|||
|
||||
const raiser = ({ value, expected }) => {
|
||||
const result = compareValues({ expected, value });
|
||||
if (!Cypress.env().SNAPSHOT_UPDATE && !result.success) {
|
||||
if ((!Cypress.env().updateSnapshots || !Cypress.config('snapshot').updateSnapshots) && !result.success) {
|
||||
devToolsLog = {
|
||||
...devToolsLog,
|
||||
message: result,
|
||||
|
|
Loading…
Reference in a new issue