Skip to content

Commit

Permalink
test: update vscode extension adding tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Phillip9587 committed Apr 12, 2024
1 parent 2706c40 commit 0fbbcb4
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions nx-stylelint/src/utils/vscode.spec.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
import type { Tree } from '@nx/devkit';
import { readJson, writeJson } from '@nx/devkit';
import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing';
import { Tree, readJson, writeJson } from '@nx/devkit';
import { createTree } from '@nx/devkit/testing';
import { addStylelintVSCodeExtension } from './vscode';

describe(addStylelintVSCodeExtension.name, () => {
let tree: Tree;

beforeEach(() => {
tree = createTreeWithEmptyWorkspace({ layout: 'apps-libs' });
});
beforeEach(() => (tree = createTree()));

it('should add stylelint vscode extension to vscode extension recommendations when they exist', async () => {
writeJson(tree, '.vscode/extensions.json', { recommendations: [] });
Expand Down

0 comments on commit 0fbbcb4

Please sign in to comment.