walmartlabs / easy-fix Goto Github PK
View Code? Open in Web Editor NEWeasy-fix: run integration tests like unit tests
License: MIT License
easy-fix: run integration tests like unit tests
License: MIT License
Projects like https://netflix.github.io/pollyjs/ let you replay when the recording exists (ideal), or record if it's missing.
When working on tests/features, this behavior is desirable to having to switch TEST_MODE
& continually re-running tests/code.
Let's say there is a function F(x)
such that x
is an object, and f
returns a Promise. If inside of f
, x
is mutated, such as via x.a = 'blah'
, then the arguments that get serialized to the mock file will include a: "blah"
. Instead, the arguments to f
should be snapshotted at the time that the function is called, and what is serialized to the mock file should not reflect later mutations.
https://github.com/walmartlabs/easy-fix/blob/master/index.js#L126
Would be nice if wrapAsyncMethod
supported Promises. Could submit a PR if you're open to it
Great product. Wanted to try a simple test in capture
and then replay
mode for a mocha test. I am trying to make it work with a browser test, which opens a site in a browser, captures the traffic and then replays the traffic when machine is not connected to Internet at all. Is that something doable?
Which is the approach to use easy-fix in a Continuos Integration env? It's not clear for me at this moment. Which mode should I use to run the integration tests in a CI? Which should be the proper flow? I'm a bit confused
This would allow the filename
to be dynamic based on the args provided to the call.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.