]> git.koha-community.org Git - koha.git/commit
Bug 37490: Add a test to detect when yarn.lock is not updated
authorMason James <mtj@kohaaloha.com>
Fri, 26 Jul 2024 10:54:15 +0000 (22:54 +1200)
committerKatrin Fischer <katrin.fischer@bsz-bw.de>
Mon, 2 Sep 2024 10:13:47 +0000 (12:13 +0200)
commit8f0dc36f0db6c247196feca3661745f7f2ef86f6
tree9d90a0711908cda6980dff5c2cbbc06d684bbcc5
parent6c162a8a9550e1939f08c82586ab5e56ec5ecd63
Bug 37490: Add a test to detect when yarn.lock is not updated

to test...

1/ set koha repo to state where yarn.lock is not updated

    $ git reset --hard 67db70d4

2/ run test, observe FAIL

    $ prove ./xt/verify-yarnlock.t
    ./xt/verify-yarnlock.t .. error Your lockfile needs to be updated, but yarn was run with `--frozen-lockfile`.
    ./xt/verify-yarnlock.t .. 1/1
    #   Failed test 'verify yarn.lock file is updated correctly'
    ...
    Result: FAIL

3/ set koha repo to state where yarn.lock is updated

    $ yarn install

4/ note yarn.lock is now updated

    $ git status
    ...
    modified:   yarn.lock

5/ run test, observe SUCCESS

    $ prove -v ./xt/verify-yarnlock.t
    ./xt/verify-yarnlock.t ..
    ok 1 - verify yarn.lock file is updated correctly
    All tests successful.
    Files=1, Tests=1,  1 wallclock secs ( 0.02 usr  0.01 sys +  1.16 cusr  0.27 csys =  1.46 CPU)
    Result: PASS

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
xt/verify-yarnlock.t [new file with mode: 0755]