Implement tests #26

Merged
Sebmaster merged 6 commits from feature-tests into master 2013-05-18 13:08:49 +00:00
Sebmaster commented 2013-05-18 12:00:19 +00:00 (Migrated from github.com)

As per reddit comment/mail I think automated tests would be nice.

I was thinking of implementing it with jasmine (+ jasmine-node) like I did recently in parallel.js (see vendor for jasmine and test for ... well, the tests). Any objections/other suggestions?

As per reddit comment/mail I think automated tests would be nice. I was thinking of implementing it with [jasmine](http://pivotal.github.io/jasmine/) (+ [jasmine-node](https://github.com/mhevery/jasmine-node)) like I did recently in [parallel.js](https://github.com/adambom/parallel.js) (see vendor for jasmine and test for ... well, the tests). Any objections/other suggestions?
Niggler commented 2013-05-07 19:42:36 +00:00 (Migrated from github.com)

@Sebmaster +1 I like the idea, although I would like to keep the actual XLSX files out of the repo (some may be very large). What is the best way to do that? Do you think a git submodule makes sense or a script that clones a test files repository?

@Sebmaster +1 I like the idea, although I would like to keep the actual XLSX files out of the repo (some may be very large). What is the best way to do that? Do you think a git submodule makes sense or a script that clones a test files repository?
Sebmaster commented 2013-05-07 19:45:50 +00:00 (Migrated from github.com)

Hmm, in that case a submodule might be the most sensible thing to do. We could run the git submodule command in the npm pretest script for example which would make it pretty seamless and wouldn't require an additional (bash + cmd)-script/dependency.

Hmm, in that case a submodule might be the most sensible thing to do. We could run the `git submodule` command in the npm pretest script for example which would make it pretty seamless and wouldn't require an additional (bash + cmd)-script/dependency.
Niggler commented 2013-05-07 19:53:33 +00:00 (Migrated from github.com)

@Sebmaster sounds good

@Sebmaster sounds good
Sebmaster commented 2013-05-18 12:02:44 +00:00 (Migrated from github.com)

I have a bit of time on my hands to work on this now.

Do you agree with the layout in this patch?
I was thinking of adding the more specific tests (is this cell bold?) into the file-specific test files.

I have a bit of time on my hands to work on this now. Do you agree with the layout in this patch? I was thinking of adding the more specific tests (is this cell bold?) into the file-specific test files.
Niggler commented 2013-05-18 12:35:35 +00:00 (Migrated from github.com)

Is it possible to write one function per type of test and run it on each test file? For example, there should be one common function that takes a workbook object and checks the API. Then, the test for each file would call that common function. This way, if there are changes, it would be easy to make one change.

Otherwise, the setup looks fine.

Is it possible to write one function per type of test and run it on each test file? For example, there should be one common function that takes a workbook object and checks the API. Then, the test for each file would call that common function. This way, if there are changes, it would be easy to make one change. Otherwise, the setup looks fine.
Sebmaster commented 2013-05-18 12:40:14 +00:00 (Migrated from github.com)

We could write a file, which loops through the testfiles and checks the common stuff like the ability to open and the API, but a lot of the stuff is worksheet dependant, so we have to have the file-specific stuff anyways.

I'm just not sure, if we should group by functionality or file. The choice might not be that important though.

We could write a file, which loops through the testfiles and checks the common stuff like the ability to open and the API, but a lot of the stuff is worksheet dependant, so we have to have the file-specific stuff anyways. I'm just not sure, if we should group by functionality or file. The choice might not be that important though.
Niggler commented 2013-05-18 12:51:15 +00:00 (Migrated from github.com)

I didn't mean to loop through each file; I was wondering if it was possible to set up a file with common tests (like checking if the file can be opened) and have each individual test file use those common tests as well as their own individual tests.

I guess there'd be some file like standard-tests.js that define those, and each test file (like InterviewSpec.js) would require it.

I didn't mean to loop through each file; I was wondering if it was possible to set up a file with common tests (like checking if the file can be opened) and have each individual test file use those common tests as well as their own individual tests. I guess there'd be some file like standard-tests.js that define those, and each test file (like InterviewSpec.js) would require it.
Sebmaster commented 2013-05-18 13:03:11 +00:00 (Migrated from github.com)

Something like this: 051fd0af64?

Something like this: https://github.com/Sebmaster/js-xlsx/commit/051fd0af648c9b59895774c00eb5ae23b683a8e6?
Niggler commented 2013-05-18 13:08:43 +00:00 (Migrated from github.com)

@Sebmaster yep :)

@Sebmaster yep :)
Niggler commented 2013-05-18 13:10:07 +00:00 (Migrated from github.com)

Last commit: can you add a 'test' target to the makefile (so that make test does the right thing)?

Last commit: can you add a 'test' target to the makefile (so that `make test` does the right thing)?
Sebmaster commented 2013-05-18 13:16:58 +00:00 (Migrated from github.com)

Added.

Added.
Sebmaster commented 2013-05-18 13:18:35 +00:00 (Migrated from github.com)

I guess I have to make a new pull request.

I guess I have to make a new pull request.
Sign in to join this conversation.
No description provided.