open-index/open-npm huggingface dataset:
npm package: @novaedge_apps/qa-toolkit
Description: Cypress QA Toolkit for logging, cleanup, and Jira reporting
Latest version: 0.1.13

# @novaedge/qa-toolkit

Lightweight helper package for Cypress QA automation.  
It provides a consistent logging structure for test runs and simple tools to manage logs across multiple feature files.

---

## 🚀 Installation

```bash
npm install @novaedge/qa-toolkit
```

or if you're using yarn:

```bash
yarn add @novaedge/qa-toolkit
```

---

## 🧩 Features

- 🧹 Automatic log cleanup between runs  
- 🧾 Consistent log structure (per spec/feature)  
- ⚙️ Utility tasks for tracking test results  
- 🧠 Ready for integration with Cypress plugins and tasks  

---

## 🪄 Usage

### Register log tasks in Cypress

In your Cypress `plugins/index.js` or `e2e.js` (depending on Cypress version):

```js
import { registerLogTasks } from '@novaedge/qa-toolkit';

export default (on, config) => {
  registerLogTasks(on);
  return config;
};
```

### Log results per test

In your test files:

```js
import { afterEachLogger } from '@novaedge/qa-toolkit';

afterEachLogger();
```

This ensures that each test result is appended to a structured log file for later analysis.

---

## 🧰 Command-line utilities

You can also run toolkit utilities directly from your terminal:

```bash
npx qa-toolkit clean
```

This will remove old logs and prepare a clean structure for a new run.

---

## 🧾 Logs

By default, logs are created under:

```
<your-project>/dist/logs/test-results.json
```

You can override this location with an environment variable:

```bash
CYPRESS_LOG_PATH=./custom-logs npm run cypress:run
```

---

## 🧑‍💻 Development

Clone this repository and build locally:

```bash
npm install
npm run build
```

Pack locally for testing:

```bash
npm pack
```

Then install the resulting `.tgz` in another project:

```bash
npm install ./novaedge-qa-toolkit-0.1.0.tgz
```

---

## 🧠 Troubleshooting

If logs appear in the wrong location (e.g. inside `node_modules`),  
ensure that the logger uses `process.cwd()` as base directory instead of `__dirname`.  
This guarantees logs are written to the calling project, not the package folder.

---

## 📄 License

MIT © NovaEdge