From 5dae644e87af1ee4c5c928038cdb7ca9035d84e2 Mon Sep 17 00:00:00 2001
From: Joshua <data@shard.wtf>
Date: Thu, 23 Mar 2023 15:06:06 +0100
Subject: [PATCH] rename tests and remove spec test

---
 cypress/e2e/{spec.cy.js => 1.cy.js}        | 22 +++++++++++++++-------
 cypress/e2e/{Second Spec.cy.js => 2.cy.js} |  0
 src/snapshot-spec.js                       | 13 -------------
 3 files changed, 15 insertions(+), 20 deletions(-)
 rename cypress/e2e/{spec.cy.js => 1.cy.js} (62%)
 rename cypress/e2e/{Second Spec.cy.js => 2.cy.js} (100%)
 delete mode 100644 src/snapshot-spec.js

diff --git a/cypress/e2e/spec.cy.js b/cypress/e2e/1.cy.js
similarity index 62%
rename from cypress/e2e/spec.cy.js
rename to cypress/e2e/1.cy.js
index 9d2c9c1..f702c84 100644
--- a/cypress/e2e/spec.cy.js
+++ b/cypress/e2e/1.cy.js
@@ -1,6 +1,6 @@
 /* eslint-env mocha */
 /* global cy */
-describe("@cypress/snapshot", () => {
+describe("@datashard/snapshot", () => {
   context("simple types", () => {
     it("works with objects", () => {
       cy.fixture("File2").snapshot({
@@ -23,11 +23,19 @@ describe("@cypress/snapshot", () => {
       });
     });
 
-    it("works with arrays", () => {
-      cy.wrap([1, 2, 3]).snapshot({
-        snapshotPath: "cypress/snapshots",
-        snapshotName: "Arrays",
-      });
-    });
+    it(
+      "works with arrays",
+      {
+        env: {
+          SNAPSHOT_UPDATE: true,
+        },
+      },
+      () => {
+        cy.wrap([1, 2, 3, 4]).snapshot({
+          snapshotPath: "cypress/snapshots",
+          snapshotName: "Arrays",
+        });
+      }
+    );
   });
 });
diff --git a/cypress/e2e/Second Spec.cy.js b/cypress/e2e/2.cy.js
similarity index 100%
rename from cypress/e2e/Second Spec.cy.js
rename to cypress/e2e/2.cy.js
diff --git a/src/snapshot-spec.js b/src/snapshot-spec.js
deleted file mode 100644
index 947de69..0000000
--- a/src/snapshot-spec.js
+++ /dev/null
@@ -1,13 +0,0 @@
-const api = require(".");
-const la = require("lazy-ass");
-const is = require("check-more-types");
-
-describe("@datashard/snapshot", () => {
-  it("is an object", () => {
-    la(is.object(api));
-  });
-
-  it("has register", () => {
-    la(is.fn(api.register));
-  });
-});