Closed kaustavdm closed 9 years ago
@jaipradeesh There is now a file called tests/methodSpec.js
resulting from #8. Please pull the latest master into your branch or else you will hit merge conflicts.
Also, it may be easier to just add your bunch of tests to the current methodSpec.js
.
var finder = new Applait.Finder();
finder.hidden = false;
var checkhidden = finder.checkhidden("/sdcard/DCIM/100MZLLA/1.jpg");
expect(checkhidden).toBe(false);
@kaustavdm This test always fails. It should return false
when this.hidden
is false
, right?
@jaipradeesh you need to pass them in the constructor options. Adding a setAttribute
method is one of the feature implementations I have in mind. But for now, you need to do this:
var finder = new Applait.Finder({ hidden: true });
Write a separate spec for
checkhidden
method.It should test if
checkhidden
:false
ifthis.hidden = false
false
if filename begins with a dot.false
if file is inside a hidden directory (whose name begins with a dot)true
ifthis.hidden = true
Put these tests in a new specfile at
tests/methodSpec.js
.