declapract-typescript-ehmpathy 0.23.6 → 0.23.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,12 +1,15 @@
1
- import { stage, Stage } from './src/utils/environment';
2
-
3
- // set a longer timeout
4
1
  // eslint-disable-next-line no-undef
5
2
  jest.setTimeout(90000); // since we're calling downstream apis
6
3
 
7
4
  /**
8
- * sanity check that integration tests are only run in 'test' environment
9
- * - if they are run in prod environment, we could load a bunch of junk data into our prod databases, which would be no bueno
5
+ * sanity check that unit tests are only run the 'test' environment
6
+ *
7
+ * usecases
8
+ * - prevent polluting prod state with test data
9
+ * - prevent executing financially impacting mutations
10
10
  */
11
- if (stage !== Stage.TEST && process.env.I_KNOW_WHAT_IM_DOING !== 'true')
12
- throw new Error(`integration-test is not targeting stage 'test'`);
11
+ if (
12
+ process.env.NODE_ENV !== 'test' &&
13
+ process.env.I_KNOW_WHAT_IM_DOING !== 'true'
14
+ )
15
+ throw new Error(`unit-test is not targeting stage 'test'`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "declapract-typescript-ehmpathy",
3
- "version": "0.23.6",
3
+ "version": "0.23.7",
4
4
  "description": "declapract best practices declarations for typescript",
5
5
  "main": "src/index.js",
6
6
  "repository": "ehmpathy/declapract-typescript-ehmpathy",