niffy icon indicating copy to clipboard operation
niffy copied to clipboard

Can't get test to fail

Open jessehattabaugh opened this issue 6 years ago • 4 comments

I'm just getting started so I'm probably doing something wrong but this test passes. I'm comparing google.com and yahoo.com, so I'd expect it to fail.

const Niffy = require('niffy');

describe('testing niffy', function () {
  let niffer = null;
  
  before(function () {
    niffer = new Niffy(
      'https://www.google.com',
      'https://www.yahoo.com',
      { show: true }
    );
  });
  
  it('/', function* () {
    yield niffer.test('/');
  });
  
  after(function* () {
    yield niffer.end();
  });
});

jessehattabaugh avatar Aug 01 '17 21:08 jessehattabaugh

I'm having this same issue. I've copied the code right here and it doesn't fail between google.com and google.co.jp, and I've spun up some test servers with different content and it doesn't fail there, either. Please help?

eainmonster avatar Aug 04 '17 01:08 eainmonster

I'm having this same issue

coding-nemo avatar Aug 12 '17 09:08 coding-nemo

what environment are you using? mine fail fine (macos, node 8.4.0, niffy 0.2.0)

screen shot 2017-09-14 at 17 27 12

mousemke avatar Sep 14 '17 15:09 mousemke

I also ran into this issue.

Tests were running and passing very fast using google.com and google.co.jp.

Turns out mocha wasn't finding the .opts file so co-mocha wasn't being required before execution.

Quick test is to see if adding --require co-mocha fixes things. You can also use mocha --opts /path/to/mocha.opts to point mocha directly to your mocha.opts.

delavara avatar Sep 28 '17 01:09 delavara