Implement tests #26
No reviewers
Labels
No Label
DBF
Dates
Defined Names
Features
Formula
HTML
Images
Infrastructure
Integration
International
ODS
Operations
Performance
PivotTables
Pro
Protection
Read Bug
SSF
SYLK
Style
Write Bug
good first issue
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sheetjs/sheetjs#26
Loading…
Reference in New Issue
No description provided.
Delete Branch "feature-tests"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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?
@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?
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.@Sebmaster sounds good
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.
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.
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.
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.
Something like this:
051fd0af64
?@Sebmaster yep :)
Last commit: can you add a 'test' target to the makefile (so that
make test
does the right thing)?Added.
I guess I have to make a new pull request.