krasimir / atomus Goto Github PK
View Code? Open in Web Editor NEWA small utility library for running client-side tests in Node.js environment
License: MIT License
A small utility library for running client-side tests in Node.js environment
License: MIT License
Hi, i just want to know if you've implemented the fabulous SVG API in the atomus window object ? I ask that because, it's not the case in JSDOM window.
Thanks, a great job.
Hi
Just starting exploring Atomus, seems promising
I experience an error on ready event
is it a known problem, or is it something i do wrong ?
feel free to ask if more needed
Thanks a lot
Laurent
fs.readFile(path.join(__dirname, '../../www/html/login.html'), 'utf8', function(err, html_string) {
if (err) {
throw err;
}
console.log(html_string); // correct
atomus()
.html(html_string)
.ready(function(errors, window) { // error here
[Error: Module version mismatch. Expected 47, got 46.]
Error: Module version mismatch. Expected 47, got 46.
at Error (native)
at process.module.(anonymous function) [as dlopen] (ATOM_SHELL_ASAR.js:159:20)
at Object.Module._extensions..node (module.js:450:18)
at Object.module.(anonymous function) [as .node] (ATOM_SHELL_ASAR.js:159:20)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:313:12)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at bindings (/home/lgodard/projets/nodejs/fec/src/node_modules/atomus/node_modules/jsdom/node_modules/contextify/node_modules/bindings/bindings.js:76:44)
at Object.<anonymous> (/home/lgodard/projets/nodejs/fec/src/node_modules/atomus/node_modules/jsdom/node_modules/contextify/lib/contextify.js:1:113)
at Module._compile (module.js:425:26)
at Object.Module._extensions..js (module.js:432:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:313:12)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object.<anonymous> (/home/lgodard/projets/nodejs/fec/src/node_modules/atomus/node_modules/jsdom/lib/jsdom/browser/index.js:5:21)
at Module._compile (module.js:425:26)
at Object.Module._extensions..js (module.js:432:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:313:12)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object.<anonymous> (/home/lgodard/projets/nodejs/fec/src/node_modules/atomus/node_modules/jsdom/lib/jsdom.js:10:27)
at Module._compile (module.js:425:26)
at Object.Module._extensions..js (module.js:432:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:313:12)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at process (/home/lgodard/projets/nodejs/fec/src/node_modules/atomus/lib/index.js:37:17)
at Object.api.ready (/home/lgodard/projets/nodejs/fec/src/node_modules/atomus/lib/index.js:185:5)
at /home/lgodard/projets/nodejs/fec/src/test/main/html_login.test.js:19:6
at tryToString (fs.js:414:3)
at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:401:12)
However, it gets complex if we want to test only part of our application. We have to create a page that contains only the needed pieces. This definitely does not scale.
At work, we use AngularJS and unit-test the small parts (directives, services...) of our application like a breeze. I just checked and our 1224 easily written client unit tests, nearly all involving spawning some DOM, take 13s to execute.
What is exactly the problem you're trying to solve ?
Note : We also have e2e tests using selenium to complement those unit tests (black box, working on the full webapp) but that's not the target of you lib, isn't it ?
Line 46 in 10487b4
This line shouldn't happen by default. It spoils output while using in tests.
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.