Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm unit test failed on vue form inputs bound #2

Open
Lysander086 opened this issue Mar 17, 2020 · 1 comment
Open

npm unit test failed on vue form inputs bound #2

Lysander086 opened this issue Mar 17, 2020 · 1 comment

Comments

@Lysander086
Copy link

image
err.log

Basically all unit tests failed at vue form data bound .

git commit log: 70d9be6
commit msg: implement e2e tests of login and register

@GeoffreyHayward
Copy link

Hi @Lysander686,

I had the same issue. Here is the fix that I came up with.

  it('should have form inputs bound with data model', () => {
    ...
    fieldUsername.setValue(username)
    fieldEmailAddress.setValue(emailAddress)
    fieldPassword.setValue(password)
    expect(wrapper.vm.form.username).toEqual(username)
    expect(wrapper.vm.form.emailAddress).toEqual(emailAddress)
    expect(wrapper.vm.form.password).toEqual(password)
  })

I hope that helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants