Skip to content

Cant get assertions to fail #442

@samueladesoga

Description

@samueladesoga

I hjave writtedn a test as below and the assertions doesnt seem to fail. it always passes.

Can you help point to what is going on.

A simple assertion works e.g. expect(true).to.Be(false) will pass

but using awsTesting type assertion never fails

import { invoke } from 'aws-testing-library/lib/utils/lambda'
 import awsTesting from 'aws-testing-library/lib/chai'
import chai = require('chai')
chai.use(awsTesting);

const { expect } = chai;


      const result = await invoke(
        region,
        'functionName',
        event,
      );

      await expect({
        region: region,
        function: 'functionName',
      }).to.have.log(
        'zzzzzzzzzzz'
      );

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions