Closed mathiasrw closed 8 years ago
There is a special file: test/index.html which runs mocha tests in browsers. I did not updated for some time, but now it is more or less updated. Unfortunately, AlaSQL produces some errors into it, so it is a new set of challenges for us.
I usually run local server in /alasql
directory:
> cd alasql
alasql> http-server
Then run this page from browser:
http://localserver:8080/test
@mathiasrw Could you adjust test374 and test376, so they can work in browser?
We have 42 (!) failures in browser test. It is time to fix them (including IndexdDB problems)
I got the following stats:
alasql@0.2.2-pre-develop+160105.205858
alasql@0.2.2-pre-develop+160105.205858
alasql@0.2.2-pre-develop+160105.205858
I might put test results into test and have testlog.md as somewhere to put final scores
Could you adjust test374 and test376, so they can work in browser?
Only saw this now. Yes for sure!
I have changed browsers tests and fixed IndexedDB. @mathiasrw Could you pull the changes?
Sure!
alasql@0.2.2-pre-develop+160105.205858
alasql@0.2.2-pre-develop+160105.205858
alasql@0.2.2-pre-develop+160105.205858
Thnx! It is a good time to study debugger tools for Safary/FF/IE. BTW we need to check with IE also (I will run tests tomorrow)
:+1:
There is a big difference how FF and Chrome treat new Date(value)
expression.
FF is more sensitive to incoming date formats...
When we build a modular system we could make it possible to include the date time magic from momentsjs
Made a solution so we dont need to remember to add new tests to the browser test.
If we dont want a test to be included in the browser we can add if(window) return;
inside describe(...
Please pull and run npm run test:browser
There is a - ehh - funny feature when you run it in safari - im working on it.
Last stats:
alasql@0.2.2-pre-develop+160105.205858
alasql@0.2.2-pre-develop+160105.205858
alasql@0.2.2-pre-develop+160105.205858
Please, use:
if(typeof exports != 'object') {...}
instead of:
if(window) {...}
Try to run mocha .
in Node.js now :)
:+1:
Ran the full SQLlogictest - and last version make sure that 3 new test files are 100% ok - woohooo !!!
So now we have 135 out of 622 files 100% OK
:+1:
Now if you run mocha .
it opens the browser with empty page. How to eliminate this?
Hmm. That is strange.
I have changed no files that I did not create for the new setup.
I have to look into that.
Can reproduce error any more.
To avoid hidden browser specific issues (as #517) it would be good to be able to run all the tests from a .html file that can be opened in different browsers.
It could be inspired by something like https://nicolas.perriault.net/code/2013/testing-frontend-javascript-code-using-mocha-chai-and-sinon/ (I am sure there are many other options)
We need to be able to reuse the same test files as when testing node.