Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4870

Why is the expect (ember-mocha) doesn't run in ember-mirage route?

$
0
0
  it('check request \'by\' query param', async function() {
    this.by = 'gender';

    this.server.get('/patients/stats', (_schema: any, request: any) => {            
      expect(request.queryParams.by).to.equal(this.by + 'sdfdg');
      
      return {
        items: [
          {
            label: 'Male',
            count: 157
          },
          {
            label: 'Female',
            count: 144
          }
        ],
        meta: {
          total: 301
        }
      }
    });

    await render(hbs`<Patients::Stats @by={{this.by}} />`);
  });

The expect(request.queryParams.by).to.equal(this.by + 'sdfdg'); should not pass the test because the query param (request.queryParams.by) is equal to ‘gender’. But the test somehow still passed…

5 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 4870

Trending Articles