spadgos / myrtle Goto Github PK
View Code? Open in Web Editor NEWA Javascript mocking framework
Home Page: http://github.com/spadgos/myrtle/wiki
License: GNU Lesser General Public License v3.0
A Javascript mocking framework
Home Page: http://github.com/spadgos/myrtle/wiki
License: GNU Lesser General Public License v3.0
Tests should be able to be skipped - always, as well as conditionally.
this.skip("reason for the skip");
this.skipIf(x === y, "reason for the skip");
The postMessage zero-ms timeout method used internally by Tyrtle (and possibly by other users) is not being modified by fakeTimers
. It should.
There should be a convenience method provided so that a function can be instrumented, then a user-defined function can be executed and automatically cleaned up afterwards.
Tests should be able to be executed asynchronously.
Each time a function is mocked, then the API functions are created anew. Instead, many of them could be reused between calls.
After the test suite has run, Chrome (admittedly version 5 on Ubuntu) does not change the favicon to show the tick or cross. Instead the hourglass remains.
expected:
O.f = function (a, b) { };
alert(O.f.length, 2);
Myrtle.spy(O, 'f');
alert(O.f.length, 2);
actual:
Myrtle.spy(O, 'f');
alert(O.f.length, 0);
Set up the project with the appropriate files for npm integration.
Currently, the this
inside a module has functions which a user should never use. Instead, a reduced set of functions should be provided to reduce complexity.
Tyrtle needs to have functions which are executed before and after each test and module. Asynchronous methods should be supported. Designating which of these helpers are asynchronous could be done by counting the arguments, via the function.length
property.
// synchronous
this.before(function () { });
// asynchronous
this.before(function (callback) { });
It's a bit clunky to have to supply all the options to Myrtle(). There should be only be a single way to spy/stub a method. Spying should be on by default or even non-configurable.
Tyrtle needs to allow users to extend the assert method with custom assertions.
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.