SearchBar: karma test is failed

when i am using [(ngModel)] inside searchbar like

<ion-searchbar [(ngModel)]="searchQuery" (ionInput)="getFilteredLabs($event)"></ion-searchbar>

functionally its working fine…but while unit testing it is showing error

× initialises
PhantomJS 2.1.1 (Windows 8 0.0.0)
Failed: EXCEPTION: Error in build/pages/labs/labs.html:10:17
ORIGINAL EXCEPTION: No value accessor for ''
[object Object]

× should get a list of labs

I added Searchbar directive from ionic-angular after getting reference from

but its is showing error

  × should get a list of labs
      PhantomJS 2.1.1 (Windows 8 0.0.0)
    Failed: EXCEPTION: Error in ./Searchbar class Searchbar - inline template:0:736
    ORIGINAL EXCEPTION: TypeError: undefined is not a constructor (evaluating 'this._config.getBoolean('spellcheck', false)')

How to solve this issue?

Try adding the Searchbar to the directives part of the @component declaration that uses the template with the <ion-searchbar> in it. If this were the only directive you use, it would look like

import { ..., Searchbar, ... } from 'ionic-angular';
@Component {
    directives: [Searchbar]
class ...

Oops. I see that you did that already… Did you do this as described here? Probably… in that case I’m not sure.

Yes tried as you mentioned above already .In that case only i am facing this problem…

    placeholder="Filter by name, city or pincode">
  templateUrl: 'build/pages/labs/labs.html',
  providers: [LabsProvider],

someone help me regarding this issue?