Bump dependencies to latest, hold ESLint
This commit updates the project's npm dependencies to their
latest versions.
Updates to the following dependencies are on hold due to compatibility
issues:
- `@typescript-eslint/eslint-plugin`:
- Blocked by `@vue/eslint-config-airbnb-with-typescript`
(vuejs/eslint-config-airbnb#63).
- `@typescript-eslint/parser`:
- Blocked by `@vue/eslint-config-airbnb-with-typescript`
(vuejs/eslint-config-airbnb#63).
- `@vue/eslint-config-typescript`:
- Blocked by `@vue/eslint-config-airbnb-with-typescript`
(vuejs/eslint-config-airbnb#63).
- `eslint`:
- Blocked by `@vue/eslint-config-airbnb-with-typescript`
(vuejs/eslint-config-airbnb#65).
- Blocked by `@typescript-eslint/eslint-plugin` and
`@typescript-eslint/parser`
(typescript-eslint/typescript-eslint#8211).
These dependencies remain at their current major versions, and
their status is documented in the `package.json` to inform future
updates.
Other supporting changes:
- Moves `@types/markdown-it` to `devDependencies` which was incorrectly
included in `dependencies`.
- Fix error in `TreeView.spec` tests, revealed by the version bump.
- Update `markdown-it` import to match the new file.
This commit is contained in:
@@ -12,7 +12,9 @@ describe('TreeView', () => {
|
||||
it('renders all provided root nodes correctly', async () => {
|
||||
// arrange
|
||||
const nodes = createSampleNodes();
|
||||
const wrapper = createTreeViewWrapper(nodes);
|
||||
const { wrapper } = mountWrapperComponent({
|
||||
initialNodeData: nodes,
|
||||
});
|
||||
|
||||
// act
|
||||
await waitForStableDom(wrapper.element);
|
||||
@@ -33,10 +35,12 @@ describe('TreeView', () => {
|
||||
const secondNodeLabel = 'Node 2';
|
||||
const initialNodes: TreeInputNodeDataWithMetadata[] = [{ id: 'node1', data: { label: firstNodeLabel } }];
|
||||
const updatedNodes: TreeInputNodeDataWithMetadata[] = [{ id: 'node2', data: { label: secondNodeLabel } }];
|
||||
const wrapper = createTreeViewWrapper(initialNodes);
|
||||
const { wrapper, nodes } = mountWrapperComponent({
|
||||
initialNodeData: initialNodes,
|
||||
});
|
||||
|
||||
// act
|
||||
await wrapper.setProps({ nodes: updatedNodes });
|
||||
nodes.value = updatedNodes;
|
||||
await waitForStableDom(wrapper.element);
|
||||
|
||||
// assert
|
||||
@@ -45,15 +49,17 @@ describe('TreeView', () => {
|
||||
});
|
||||
});
|
||||
|
||||
function createTreeViewWrapper(initialNodeData: readonly TreeInputNodeDataWithMetadata[]) {
|
||||
return mount(defineComponent({
|
||||
function mountWrapperComponent(options?: {
|
||||
readonly initialNodeData?: readonly TreeInputNodeDataWithMetadata[],
|
||||
}) {
|
||||
const nodes = shallowRef(options?.initialNodeData ?? createSampleNodes());
|
||||
const wrapper = mount(defineComponent({
|
||||
components: {
|
||||
TreeView,
|
||||
},
|
||||
setup() {
|
||||
provideDependencies(new ApplicationContextStub());
|
||||
|
||||
const nodes = shallowRef(initialNodeData);
|
||||
const selectedLeafNodeIds = shallowRef<readonly string[]>([]);
|
||||
|
||||
return {
|
||||
@@ -72,6 +78,10 @@ function createTreeViewWrapper(initialNodeData: readonly TreeInputNodeDataWithMe
|
||||
</TreeView>
|
||||
`,
|
||||
}));
|
||||
return {
|
||||
wrapper,
|
||||
nodes,
|
||||
};
|
||||
}
|
||||
|
||||
interface TreeInputMetadata {
|
||||
|
||||
Reference in New Issue
Block a user