Open raftheunis87 opened 8 years ago
@raftheunis87 seems like expect(file.path).toContain('include_me.css');
is printing out Exprecetd...
on every call. You can look into expect
library for a way to disable this logging.
@floatdrop Thanks for the quick reply.
It's not just the logging, the test is actually failing :-(
@raftheunis87 can you print error message in assertion
event?
@floatdrop
.on('assertion', function (err) {
console.log(err);
done.fail(err);
})
The console.log is not printed, so I guess the event doesn't happen. But it's weird that I get the following output:
A copy stream should test if the files are in the stream
- Expected '/test/specs/streams/copy/resources/src/shared/style/include_me_2.css' to contain 'include_me.css'.
- Expected 'test/specs/streams/copy/resources/src/authenticated/style/img/included.jpg' to contain 'include_me.css'.
- Expected 'test/specs/streams/copy/resources/src/shared/style/img/included.jpg' to contain 'include_me.css'.
To me it seems like he is matching against all the files in the stream, even if there was a match with one of them? I would expect that when 1 of the files matches, that it doesn't matter anymore if any of the other files match, right?
I would expect that when 1 of the files matches, that it doesn't matter anymore if any of the other files match, right?
@raftheunis87 didn't think about it, but it does make sense.
@floatdrop Is this going to be fixed? Or should I look into it and create a pull request? :)
@raftheunis87 PR would be awesome :)
Hey,
First of all, thanks for this library! It really makes testing streams a joy :-).
I got a problem with the any assertion. Maybe I'm using the wrong syntax. What I try to do is the following:
The problem is that it is checking all the files in the stream against the 'include_me.css'. I get the following output:
The 'include_me.css' is also in this filepath as well, but it is not logged as an error because it matches.
What can I do to resolve this issue?
Kind regards,
Raf