-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e52172a
commit 0f0bdec
Showing
2 changed files
with
5 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,19 +3,18 @@ import { mount } from '@vue/test-utils'; | |
import PurlField from '@/components/FlawForm/PurlField.vue'; | ||
|
||
describe('purlField.vue', () => { | ||
it('should pass valid PURL test', async () => { | ||
it('should pass valid PURL test', async () => { | ||
const wrapper = mount(PurlField, { props: { purl: 'pkg:npm/%40angular/[email protected]' } }); | ||
// input.setValue('pkg:npm/%40angular/[email protected]'); | ||
// await input.trigger('input'); | ||
// @ts-expect-error error does not exist on wrapper vm | ||
expect(wrapper.vm.error).toBeNull(); | ||
}); | ||
|
||
it('should pass invalid PURL test', async () => { | ||
const wrapper = mount(PurlField); | ||
const input = wrapper.find('input'); | ||
input.setValue('invalid-purl'); | ||
await input.trigger('input'); | ||
|
||
// @ts-expect-error error does not exist on wrapper vm | ||
expect(wrapper.vm.error).not.toBeNull(); | ||
}); | ||
}); |