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

Cant get assertions to fail #442

Open
samueladesoga opened this issue Aug 16, 2021 · 1 comment
Open

Cant get assertions to fail #442

samueladesoga opened this issue Aug 16, 2021 · 1 comment

Comments

@samueladesoga
Copy link

samueladesoga commented Aug 16, 2021

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'
      );
@erezrokah
Copy link
Owner

Hi @samueladesoga, sorry for the very long time to reply.

Can you provide a repository reproducing this issue? Ideally it will have a way to deploy a minimal reproduction to AWS and a complete test that fails.

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

No branches or pull requests

2 participants