• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

javierbrea / cypress-localstorage-commands / 3880130374

pending completion
3880130374

push

github

GitHub
Merge pull request #550 from javierbrea/renovate/eslint-plugin-jest-27.x

29 of 29 branches covered (100.0%)

Branch coverage included in aggregate %.

77 of 77 relevant lines covered (100.0%)

15.58 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/src/plugin.js
1
const {
2
  GET_SNAPSHOT_TASK,
3
  SET_SNAPSHOT_TASK,
4
  CLEAR_SNAPSHOT_TASK,
5
  NODE_EVENTS_INSTALLED,
6
} = require("./constants");
1✔
7

8
module.exports = (on, config) => {
1✔
9
  const namedSnapshots = {};
1✔
10
  let globalSnapshot = {};
1✔
11
  config.env[NODE_EVENTS_INSTALLED] = true;
1✔
12

13
  // Create cypress-local-storage-commands tasks
14
  on("task", {
1✔
15
    [GET_SNAPSHOT_TASK]: function (name) {
16
      return name ? namedSnapshots[name] || {} : globalSnapshot;
11✔
17
    },
18
    [SET_SNAPSHOT_TASK]: function ({ name, snapshot }) {
19
      if (name) {
4✔
20
        namedSnapshots[name] = snapshot;
2✔
21
      } else {
22
        globalSnapshot = snapshot;
2✔
23
      }
24
      return null;
4✔
25
    },
26
    [CLEAR_SNAPSHOT_TASK]: function (name) {
27
      if (name) {
6✔
28
        namedSnapshots[name] = {};
3✔
29
      } else {
30
        globalSnapshot = {};
3✔
31
      }
32
      return null;
6✔
33
    },
34
  });
35

36
  return config;
1✔
37
};
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc