New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests for more modules; starting with QR code module jsqr #546

Open
jywarren opened this Issue Dec 16, 2018 · 11 comments

Comments

Projects
None yet
4 participants
@jywarren
Copy link

jywarren commented Dec 16, 2018

We are starting to grow this library substantially and could really use more tests for specific modules. One example is that this pull request is trying to update jsqr but we don't test that module, so we don't know if that update breaks the module: #532

The test could look something like this one, and be in the same folder; we could use a data-url encoded QR code as test data, and confirm that we get the correct data out of the module!

Here's the module code itself:

https://github.com/publiclab/image-sequencer/tree/main/src/modules/DecodeQr

Once this is done, we could move on to each other module. This would be a great repeat first-timers-only issue!


This has been marked as a good candidate for becoming a first-timers-only issue like these, meaning that it's simple, self-contained, and with some extra formatting, could be a great entry point for a new contributor. If you're familiar enough with this code, please consider reformatting or reposting it as a first-timers-only issue, and then ping @publiclab/reviewers to get it labelled. Or, if this is not your first time, try to solve it yourself!

@gitmate

This comment has been minimized.

Copy link

gitmate bot commented Dec 16, 2018

GitMate.io thinks possibly related issues are #51 (More Testing), #71 (Implement QR-Decode Module), #141 (move module tests into separate test files), #162 (Modify the test to check number of modules), and #434 (Rotate module).

1 similar comment
@gitmate

This comment has been minimized.

Copy link

gitmate bot commented Dec 16, 2018

GitMate.io thinks possibly related issues are #51 (More Testing), #71 (Implement QR-Decode Module), #141 (move module tests into separate test files), #162 (Modify the test to check number of modules), and #434 (Rotate module).

@vishalbakshi vishalbakshi referenced a pull request that will close this issue Dec 31, 2018

Open

Test for DecodeQR Module #584

4 of 4 tasks complete
@VibhorCodecianGupta

This comment has been minimized.

Copy link

VibhorCodecianGupta commented Jan 13, 2019

@jywarren I'm on this!
Would love to know if we already have some packages in IS to compare images or their base64 encodings, was thinking of testing the actual functioning of modules against benchmark images.

@Mridul97

This comment has been minimized.

Copy link

Mridul97 commented Jan 13, 2019

@jywarren @VibhorCodecianGupta We don't have any such package in IS already, was writing the test of brightness module #624 , so there is one issue coming while creating a way of image comparison, the module is returning the output as undefined. Please have a look!

ss_41

@jywarren

This comment has been minimized.

Copy link

jywarren commented Jan 16, 2019

compare images or their base64 encodings

Sorry, yes we do actually, although we don't use it enough!

looks-same:

looksSame(step1, step2, function(err, res) {
if (err) console.log(err);
t.equal(res, false);
t.end();
});

@jywarren

This comment has been minimized.

Copy link

jywarren commented Jan 16, 2019

Sorry took me a few days, i'm a bit behind!

@VibhorCodecianGupta

This comment has been minimized.

Copy link

VibhorCodecianGupta commented Jan 17, 2019

@jywarren looks great. I'll get on to writing some tests right away!

@Mridul97

This comment has been minimized.

Copy link

Mridul97 commented Jan 17, 2019

@VibhorCodecianGupta I was also working on adding tests, can we collaborate on this one, maybe you can create tests for some modules and I can create for others, Just a suggestion. 😃

@VibhorCodecianGupta

This comment has been minimized.

Copy link

VibhorCodecianGupta commented Jan 17, 2019

@Mridul97 sounds nice! I think you were working on the brightness module, right? I'll pick up a couple others for the time being, and make a PR. We can proceed accordingly!

@Mridul97

This comment has been minimized.

Copy link

Mridul97 commented Jan 18, 2019

Sounds good! Yes, I am working on the brightness module!

@aashna27

This comment has been minimized.

Copy link

aashna27 commented Jan 18, 2019

@VibhorCodecianGupta @Mridul97 can you specify the modules you are writing tests for ? I would write for the others then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment