Skip to content

Commit

Permalink
test: update expected
Browse files Browse the repository at this point in the history
  • Loading branch information
privatenumber committed Feb 20, 2023
1 parent 35e2457 commit cca3d56
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ describe('attribute annotation', ({ test }) => {

const App = componentFixture();
const wrapper = mount(App, { localVue });
expect(wrapper.vm.$el.getAttribute('__vue__')).toBe(JSON.stringify([App.__file, 'App root']));
expect(wrapper.vm.$el.getAttribute('__vue__')).toBe(JSON.stringify([App.__file, '<App root>']));
});

test('fallback to name if no __file', () => {
Expand All @@ -28,7 +28,7 @@ describe('attribute annotation', ({ test }) => {
delete App.__file;

const wrapper = mount(App, { localVue });
expect(wrapper.vm.$el.getAttribute('__vue__')).toBe(JSON.stringify([App.name, 'App root']));
expect(wrapper.vm.$el.getAttribute('__vue__')).toBe(JSON.stringify([App.name, '<App root>']));
});

test('custom annotation attribute', () => {
Expand All @@ -40,7 +40,7 @@ describe('attribute annotation', ({ test }) => {

const App = componentFixture();
const wrapper = mount(App, { localVue });
expect(wrapper.vm.$el.getAttribute('random-attribute')).toBe(JSON.stringify([App.__file, 'App root']));
expect(wrapper.vm.$el.getAttribute('random-attribute')).toBe(JSON.stringify([App.__file, '<App root>']));
});

test('extended component', () => {
Expand All @@ -58,7 +58,7 @@ describe('attribute annotation', ({ test }) => {
};

const wrapper = mount(Bar, { localVue });
expect(wrapper.vm.$el.getAttribute('random-attribute')).toBe(JSON.stringify(['Bar.vue', 'App root']));
expect(wrapper.vm.$el.getAttribute('random-attribute')).toBe(JSON.stringify(['Bar.vue', '<App root>']));
});
});

Expand Down Expand Up @@ -116,6 +116,6 @@ describe('error cases', ({ test }) => {

const App = componentFixture();
const wrapper = mount(App, { localVue });
expect(wrapper.vm.$el.getAttribute('__vue__')).toBe(JSON.stringify(['App.vue', 'App root']));
expect(wrapper.vm.$el.getAttribute('__vue__')).toBe(JSON.stringify(['App.vue', '<App root>']));
});
});

0 comments on commit cca3d56

Please sign in to comment.