OS: Windows 10
Joplin 1.0.194 (dev, win32)
Sync Version: 1
Profile Version: 28
Revision: d606e021 (master)
I’m working on fixing GH issue: Support automatic dark/light theme switching according to OS settings and I have made changes in below files:
- ReactNativeClient > lib > models > Setting.js
- ReactNativeClient > lib > reducer.js
- ElectronClient > gui > ConfigScreen.jsx
- ElectronClient > app.js
Last time I submitted PR for this issue,as per discussion with @laurent there was some issues with the code and build test was missing so this time I’ve fixed those issues but now before PR I have to run build test and for that I followed steps as mentioned in CONTRIBUTING.md
So I ran this command in CliClient directory npm test
and here is the output of terminal:
R:\Dev\joplin-kowalskidev\CliClient>npm run test
> joplin@1.0.161 test R:\Dev\joplin-kowalskidev\CliClient
> gulp buildTests -L && jasmine --config=tests/support/jasmine.json
Testing with sync target: memory
Randomized with seed 50885
Started
.1
................................................................................................F......F......F...............................................................
Error converting file: list.html
--------------------------------- Got:
[
'Liste de courses',
'',
'- [X] Pizzas',
'',
'- [X] Pain',
'',
'- [X] Jambon',
'',
'- [X] On its own',
'',
'End'
]
--------------------------------- Expected:
[
'Liste de courses',
'',
'- [X] Pizzas',
'- [X] Pain',
'- [X] Jambon',
'',
'- [X] On its own',
'',
'End'
]
--------------------------------------------
F...1
.1
.....................F.FFFF...............................................
Failures:
1) services_Revision should delete old revisions (2 notes, 2 rev)
Message:
Expected 0 to be 1.
Stack:
Error: Expected 0 to be 1.
at <Jasmine>
at R:\Dev\joplin-kowalskidev\CliClient\tests-build\services_Revision.js:133:29
at <Jasmine>
at processTicksAndRejections (internal/process/task_queues.js:97:5)
2) services_Revision should not delete old revisions if one of them is still encrypted (3)
Message:
Expected 0 to be 1.
Stack:
Error: Expected 0 to be 1.
at <Jasmine>
at R:\Dev\joplin-kowalskidev\CliClient\tests-build\services_Revision.js:371:41
at <Jasmine>
at processTicksAndRejections (internal/process/task_queues.js:97:5)
3) services_Revision should delete old revisions (1 note, 2 rev)
Message:
Expected 0 to be 1.
Stack:
Error: Expected 0 to be 1.
at <Jasmine>
at R:\Dev\joplin-kowalskidev\CliClient\tests-build\services_Revision.js:73:28
at <Jasmine>
at processTicksAndRejections (internal/process/task_queues.js:97:5)
4) EnexToMd should convert from Enex to Markdown
Message:
Expected false to be true.
Stack:
Error: Expected false to be true.
at <Jasmine>
at R:\Dev\joplin-kowalskidev\CliClient\tests-build\EnexToMd.js:62:19
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async UserContext.<anonymous> (R:\Dev\joplin-kowalskidev\CliClient\tests-build\test-utils.js:373:4)
5) EnexToHtml should convert from Enex to Html: svg
Message:
Expected '<en-note>
<div><img style="margin:0px;padding:0px;outline:0px;width:74px;height:36px;position:absolute;bottom:-5px;left:0px;transform:translate(0px, 100%);stroke-dasharray:90;transition:stroke-dashoffset 0.5s cubic-bezier(0.97, 0.16, 0.62, 0.76) 0s;stroke-dashoffset:0;" src="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' data-evernote-id='97' class='js-evernote-checked'%3e%3cuse xlink:href='https://wordminds.com/wp-content/themes/wordminds/assets/img/hint_left.svg%23hint_left' data-evernote-id='98' class='js-evernote-checked'%3e%3c/use%3e%3c/svg%3e"></div>
</en-note>' to equal '<en-note>
<div><img style="margin:0px;padding:0px;outline:0px;width:74px;height:36px;position:absolute;bottom:-5px;left:0px;transform:translate(0px, 100%);stroke-dasharray:90;transition:stroke-dashoffset 0.5s cubic-bezier(0.97, 0.16, 0.62, 0.76) 0s;stroke-dashoffset:0;" src="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' data-evernote-id='97' class='js-evernote-checked'%3e%3cuse xlink:href='https://wordminds.com/wp-content/themes/wordminds/assets/img/hint_left.svg%23hint_left' data-evernote-id='98' class='js-evernote-checked'%3e%3c/use%3e%3c/svg%3e"></div>
</en-note>'.
Stack:
Error: Expected '<en-note>
<div><img style="margin:0px;padding:0px;outline:0px;width:74px;height:36px;position:absolute;bottom:-5px;left:0px;transform:translate(0px, 100%);stroke-dasharray:90;transition:stroke-dashoffset 0.5s cubic-bezier(0.97, 0.16, 0.62, 0.76) 0s;stroke-dashoffset:0;" src="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' data-evernote-id='97' class='js-evernote-checked'%3e%3cuse xlink:href='https://wordminds.com/wp-content/themes/wordminds/assets/img/hint_left.svg%23hint_left' data-evernote-id='98' class='js-evernote-checked'%3e%3c/use%3e%3c/svg%3e"></div>
</en-note>' to equal '<en-note>
<div><img style="margin:0px;padding:0px;outline:0px;width:74px;height:36px;position:absolute;bottom:-5px;left:0px;transform:translate(0px, 100%);stroke-dasharray:90;transition:stroke-dashoffset 0.5s cubic-bezier(0.97, 0.16, 0.62, 0.76) 0s;stroke-dashoffset:0;" src="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' data-evernote-id='97' class='js-evernote-checked'%3e%3cuse xlink:href='https://wordminds.com/wp-content/themes/wordminds/assets/img/hint_left.svg%23hint_left' data-evernote-id='98' class='js-evernote-checked'%3e%3c/use%3e%3c/svg%3e"></div>
</en-note>'.
at <Jasmine>
at R:\Dev\joplin-kowalskidev\CliClient\tests-build\EnexToHtml.js:45:24
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async UserContext.<anonymous> (R:\Dev\joplin-kowalskidev\CliClient\tests-build\test-utils.js:373:4)
6) EnexToHtml should convert from Enex to Html: checklist-list
Message:
Expected '<en-note>
<div>
<p>For example, consider an exported Evernote list with todo checkboxes like this:</p>
<ul>
<li>
<div><input type="checkbox" onclick="return false;">Foo</div>
</li>
<li>
<div><input type="checkbox" onclick="return false;"><b>Bar</b></div>
</li>
<li>
<div><input type="checkbox" onclick="return false;"><i>Baz</i></div>
</li>
</ul>
</div>
</en-note>' to equal '<en-note>
<div>
<p>For example, consider an exported Evernote list with todo checkboxes like this:</p>
<ul>
<li>
<div><input type="checkbox" onclick="return false;">Foo</div>
</li>
<li>
<div><input type="checkbox" onclick="return false;"><b>Bar</b></div>
</li>
<li>
<div><input type="checkbox" onclick="return false;"><i>Baz</i></div>
</li>
</ul>
</div>
</en-note>'.
Stack:
Error: Expected '<en-note>
<div>
<p>For example, consider an exported Evernote list with todo checkboxes like this:</p>
<ul>
<li>
<div><input type="checkbox" onclick="return false;">Foo</div>
</li>
<li>
<div><input type="checkbox" onclick="return false;"><b>Bar</b></div>
</li>
<li>
<div><input type="checkbox" onclick="return false;"><i>Baz</i></div>
</li>
</ul>
</div>
</en-note>' to equal '<en-note>
<div>
<p>For example, consider an exported Evernote list with todo checkboxes like this:</p>
<ul>
<li>
<div><input type="checkbox" onclick="return false;">Foo</div>
</li>
<li>
<div><input type="checkbox" onclick="return false;"><b>Bar</b></div>
</li>
<li>
<div><input type="checkbox" onclick="return false;"><i>Baz</i></div>
</li>
</ul>
</div>
</en-note>'.
at <Jasmine>
at R:\Dev\joplin-kowalskidev\CliClient\tests-build\EnexToHtml.js:45:24
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async UserContext.<anonymous> (R:\Dev\joplin-kowalskidev\CliClient\tests-build\test-utils.js:373:4)
7) EnexToHtml should convert from Enex to Html: attachment
Message:
Expected '<en-note>
<div><a href="joplin://21ca2b948f222a38802940ec7e2e5de3" hash="21ca2b948f222a38802940ec7e2e5de3" type="application/pdf" style="cursor:pointer;" alt="attachment-1">attachment-1</a></div>
<div>
<br>
<br>
</div>
</en-note>' to equal '<en-note>
<div><a href="joplin://21ca2b948f222a38802940ec7e2e5de3" hash="21ca2b948f222a38802940ec7e2e5de3" type="application/pdf" style="cursor:pointer;" alt="attachment-1">attachment-1</a></div>
<div>
<br>
<br>
</div>
</en-note>'.
Stack:
Error: Expected '<en-note>
<div><a href="joplin://21ca2b948f222a38802940ec7e2e5de3" hash="21ca2b948f222a38802940ec7e2e5de3" type="application/pdf" style="cursor:pointer;" alt="attachment-1">attachment-1</a></div>
<div>
<br>
<br>
</div>
</en-note>' to equal '<en-note>
<div><a href="joplin://21ca2b948f222a38802940ec7e2e5de3" hash="21ca2b948f222a38802940ec7e2e5de3" type="application/pdf" style="cursor:pointer;" alt="attachment-1">attachment-1</a></div>
<div>
<br>
<br>
</div>
</en-note>'.
at <Jasmine>
at R:\Dev\joplin-kowalskidev\CliClient\tests-build\EnexToHtml.js:45:24
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async UserContext.<anonymous> (R:\Dev\joplin-kowalskidev\CliClient\tests-build\test-utils.js:373:4)
8) EnexToHtml should convert from Enex to Html: en-media--audio
Message:
Expected '<en-note>
<div>
<audio controls="" preload="none" style="width:480px;">
<source src=":/9168ee833d03c5ea7c730ac6673978c1" type="audio/mp4">
<p>Your browser does not support HTML5 audio.</p>
</audio>
<p><a href=":/9168ee833d03c5ea7c730ac6673978c1">audio test</a></p>
</div>
<div>
<br>
<br>
</div>
</en-note>' to equal '<en-note>
<div>
<audio controls="" preload="none" style="width:480px;">
<source src=":/9168ee833d03c5ea7c730ac6673978c1" type="audio/mp4">
<p>Your browser does not support HTML5 audio.</p>
</audio>
<p><a href=":/9168ee833d03c5ea7c730ac6673978c1">audio test</a></p>
</div>
<div>
<br>
<br>
</div>
</en-note>'.
Stack:
Error: Expected '<en-note>
<div>
<audio controls="" preload="none" style="width:480px;">
<source src=":/9168ee833d03c5ea7c730ac6673978c1" type="audio/mp4">
<p>Your browser does not support HTML5 audio.</p>
</audio>
<p><a href=":/9168ee833d03c5ea7c730ac6673978c1">audio test</a></p>
</div>
<div>
<br>
<br>
</div>
</en-note>' to equal '<en-note>
<div>
<audio controls="" preload="none" style="width:480px;">
<source src=":/9168ee833d03c5ea7c730ac6673978c1" type="audio/mp4">
<p>Your browser does not support HTML5 audio.</p>
</audio>
<p><a href=":/9168ee833d03c5ea7c730ac6673978c1">audio test</a></p>
</div>
<div>
<br>
<br>
</div>
</en-note>'.
at <Jasmine>
at R:\Dev\joplin-kowalskidev\CliClient\tests-build\EnexToHtml.js:45:24
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async UserContext.<anonymous> (R:\Dev\joplin-kowalskidev\CliClient\tests-build\test-utils.js:373:4)
9) EnexToHtml should convert from Enex to Html: en-media--image
Message:
Expected '<en-note>
<div><input type="checkbox" onclick="return false;">This is a test</div>
<div><input type="checkbox" onclick="return false;">A test for <span style="font-weight: bold;">bold</span></div>
<div>
<input type="checkbox" onclick="return false;">A test for <i>italic</i>
<br>
<br>
</div>
<div>
<br>
<br>
</div>
<div><i><img src=":/89ce7da62c6b2832929a6964237e98e9" hash="89ce7da62c6b2832929a6964237e98e9" type="image/jpeg" alt=""></i></div>
</en-note>' to equal '<en-note>
<div><input type="checkbox" onclick="return false;">This is a test</div>
<div><input type="checkbox" onclick="return false;">A test for <span style="font-weight: bold;">bold</span></div>
<div>
<input type="checkbox" onclick="return false;">A test for <i>italic</i>
<br>
<br>
</div>
<div>
<br>
<br>
</div>
<div><i><img src=":/89ce7da62c6b2832929a6964237e98e9" hash="89ce7da62c6b2832929a6964237e98e9" type="image/jpeg" alt=""></i></div>
</en-note>'.
Stack:
Error: Expected '<en-note>
<div><input type="checkbox" onclick="return false;">This is a test</div>
<div><input type="checkbox" onclick="return false;">A test for <span style="font-weight: bold;">bold</span></div>
<div>
<input type="checkbox" onclick="return false;">A test for <i>italic</i>
<br>
<br>
</div>
<div>
<br>
<br>
</div>
<div><i><img src=":/89ce7da62c6b2832929a6964237e98e9" hash="89ce7da62c6b2832929a6964237e98e9" type="image/jpeg" alt=""></i></div>
</en-note>' to equal '<en-note>
<div><input type="checkbox" onclick="return false;">This is a test</div>
<div><input type="checkbox" onclick="return false;">A test for <span style="font-weight: bold;">bold</span></div>
<div>
<input type="checkbox" onclick="return false;">A test for <i>italic</i>
<br>
<br>
</div>
<div>
<br>
<br>
</div>
<div><i><img src=":/89ce7da62c6b2832929a6964237e98e9" hash="89ce7da62c6b2832929a6964237e98e9" type="image/jpeg" alt=""></i></div>
</en-note>'.
at <Jasmine>
at R:\Dev\joplin-kowalskidev\CliClient\tests-build\EnexToHtml.js:45:24
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async UserContext.<anonymous> (R:\Dev\joplin-kowalskidev\CliClient\tests-build\test-utils.js:373:4)
254 specs, 9 failures
Finished in 558.027 seconds
Randomized with seed 50885 (jasmine --random=true --seed=50885)
And I also tried running npm run test
command in ElectronClient and ReactNativeClient directories but it throws an error: 'Error: no test specified'
.
Please help me how to run tests when we make changes in libraries and views. I’m totally new to open source and learning a lot as getting familiarizes with Joplin