Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/detect-breaking-changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ jobs:
with:
node-version-file: '.nvmrc'
- name: Install dependencies
run: yarn install
run: npm install
- name: Build plugin
run: yarn build
run: npm run build
- name: Compatibility check
uses: grafana/plugin-actions/is-compatible@a8d2790586995c0112186302a0ebee61f02510a7
with:
Expand Down
63 changes: 0 additions & 63 deletions .github/workflows/grafana-bench.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"name": "Debug Jest test",
"type": "node",
"request": "launch",
"runtimeExecutable": "yarn",
"runtimeExecutable": "npm",
"runtimeArgs": ["run", "jest", "--runInBand", "${file}"],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
Expand Down
12 changes: 6 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,23 @@ mage build:backend && mage reloadPlugin # builds and reloads the plugin in Grafa

#### Compiling the frontend

You can build and test the frontend by using `yarn`:
You can build and test the frontend by using `npm`:

```sh
yarn test # run all test cases
yarn dev # builds and puts the output at ./dist
npm run test # run all test cases
npm run dev # builds and puts the output at ./dist
```

You can also have `yarn` watch for changes and automatically recompile them:
You can also have `npm` watch for changes and automatically recompile them:

```sh
yarn watch
npm run watch
```

#### Running E2E tests locally

1. Install [K6](https://k6.io/docs/get-started/installation/)
2. Run `yarn test:e2e:local`
2. Run `npm run test:e2e:local`

## Create a pull request

Expand Down
1 change: 1 addition & 0 deletions cspell.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"src/dashboards/**",
"dist/**",
"yarn.lock",
"package-lock.json",
"go.sum",
"mage_output_file.go"
],
Expand Down
14 changes: 14 additions & 0 deletions jest-setup.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,16 @@
// Jest setup provided by Grafana scaffolding
import './.config/jest-setup';
import { TextEncoder, TextDecoder } from 'util';

global.TextEncoder = TextEncoder;
global.TextDecoder = TextDecoder;

const mockIntersectionObserver = jest.fn().mockImplementation((arg) => ({
observe: jest.fn().mockImplementation((elem) => {
arg([{ target: elem, isIntersecting: true }]);
}),
unobserve: jest.fn(),
disconnect: jest.fn(),
}));

global.IntersectionObserver = mockIntersectionObserver;
Loading
Loading