@empiricalrun/test-gen 0.35.6 → 0.35.8

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @empiricalrun/test-gen
2
2
 
3
+ ## 0.35.8
4
+
5
+ ### Patch Changes
6
+
7
+ - 461f3dd: fix: add logs for generation stopped due to stop session requested
8
+
9
+ ## 0.35.7
10
+
11
+ ### Patch Changes
12
+
13
+ - 2145207: fix: vitest config to exclude browser tests
14
+
3
15
  ## 0.35.6
4
16
 
5
17
  ### Patch Changes
@@ -157,7 +157,7 @@ test("should annotate all important items on quizizz page", async ({
157
157
  (item) =>
158
158
  item.innerText.includes("accommodations") &&
159
159
  item.href ===
160
- "https://quizizz.com/admin/differentiation/accommodations",
160
+ "https://quizizz.com/admin/differentiation/accommodations",
161
161
  ),
162
162
  )
163
163
  .toBeTruthy();
@@ -157,7 +157,7 @@ test("should annotate all important items on quizizz page", async ({
157
157
  (item) =>
158
158
  item.innerText.includes("accommodations") &&
159
159
  item.href ===
160
- "https://quizizz.com/admin/differentiation/accommodations",
160
+ "https://quizizz.com/admin/differentiation/accommodations",
161
161
  ),
162
162
  )
163
163
  .toBeTruthy();
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/session/index.ts"],"names":[],"mappings":"AAkBA,iBAAS,iBAAiB;;;;;EAOzB;AAED,wBAAgB,iBAAiB,CAAC,EAChC,SAAS,EACT,YAAY,EACZ,UAAU,EACV,eAAe,GAChB,EAAE;IACD,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;CACzB,QAIA;AAED,wBAAsB,iBAAiB,qBAGtC;AAED,wBAAsB,eAAe,0DAqBpC;AAED,wBAAsB,UAAU,kBAqB/B;AAED,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/session/index.ts"],"names":[],"mappings":"AAmBA,iBAAS,iBAAiB;;;;;EAOzB;AAED,wBAAgB,iBAAiB,CAAC,EAChC,SAAS,EACT,YAAY,EACZ,UAAU,EACV,eAAe,GAChB,EAAE;IACD,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;CACzB,QAIA;AAED,wBAAsB,iBAAiB,qBAStC;AAED,wBAAsB,eAAe,0DAqBpC;AAED,wBAAsB,UAAU,kBAqB/B;AAED,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
@@ -5,6 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.getSessionDetails = exports.endSession = exports.getSessionState = exports.shouldStopSession = exports.setSessionDetails = void 0;
7
7
  const package_json_1 = __importDefault(require("../../package.json"));
8
+ const logger_1 = require("../bin/logger");
8
9
  const sessionDetails = {
9
10
  sessionId: undefined,
10
11
  version: package_json_1.default.version,
@@ -30,7 +31,11 @@ function setSessionDetails({ sessionId, generationId, testCaseId, projectRepoNam
30
31
  exports.setSessionDetails = setSessionDetails;
31
32
  async function shouldStopSession() {
32
33
  const sessionState = await getSessionState();
33
- return sessionState !== "started";
34
+ const shouldStopSession = sessionState !== "started";
35
+ if (shouldStopSession) {
36
+ new logger_1.CustomLogger().warn(`Generation to be stopped due to session state marked as ${sessionState}`);
37
+ }
38
+ return shouldStopSession;
34
39
  }
35
40
  exports.shouldStopSession = shouldStopSession;
36
41
  async function getSessionState() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@empiricalrun/test-gen",
3
- "version": "0.35.6",
3
+ "version": "0.35.8",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/",
6
6
  "access": "public"
@@ -63,7 +63,7 @@
63
63
  "clean": "tsc --build --clean",
64
64
  "lint": "eslint .",
65
65
  "test": "vitest run",
66
- "e2e-test": "npx playwright test",
66
+ "test-browser": "npx playwright test",
67
67
  "test:watch": "vitest",
68
68
  "test:watch-files": "vitest $0 --watch"
69
69
  }
package/vitest.config.ts CHANGED
@@ -6,5 +6,6 @@ dotenvConfig({ path: [".env.local", ".env"] });
6
6
  export default defineConfig({
7
7
  test: {
8
8
  setupFiles: ["dotenv/config"],
9
+ include: ["src/**/*.test.ts"],
9
10
  },
10
11
  });