Skip to content

[fix] Test configuration#4882

Open
ckardaris wants to merge 1 commit intophilc:masterfrom
ckardaris:fix-test-configuration
Open

[fix] Test configuration#4882
ckardaris wants to merge 1 commit intophilc:masterfrom
ckardaris:fix-test-configuration

Conversation

@ckardaris
Copy link
Copy Markdown

  • Collect tests in sub-directories.
  • Fix loading of settings for tests.

Description

This PR is based on discussion threads in #4880.

The Settings.load() call is necessary because the tests would fail to run on my machine and I was getting the following error output.

$ ./make.js test
run: started
test-unit: started
Fail "UIComponent: focus the frame when showing"
Error: Getting the setting userDefinedLinkHintCss before settings have been loaded.
    at Object.get (file:///home/charalampos.kardaris/src/vimium/lib/settings.js:137:13)
    at Object.injectUserCss (file:///home/charalampos.kardaris/src/vimium/lib/dom_utils.js:566:34)
    at UIComponent.load (file:///home/charalampos.kardaris/src/vimium/content_scripts/ui_component.js:63:14)
    at Object.<anonymous> (file:///home/charalampos.kardaris/src/vimium/tests/unit_tests/ui_component_test.js:35:13)
    at Object.runTest (file:///home/charalampos.kardaris/src/vimium/tests/vendor/shoulda.js:253:29)
    at eventLoopTick (ext:core/01_core.js:187:7)
    at async Object.runContext (file:///home/charalampos.kardaris/src/vimium/tests/vendor/shoulda.js:214:9)
    at async Object.run (file:///home/charalampos.kardaris/src/vimium/tests/vendor/shoulda.js:187:7)
    at async runUnitTests (file:///home/charalampos.kardaris/src/vimium/make.js:283:10)
    at async Task.<anonymous> (file:///home/charalampos.kardaris/src/vimium/make.js:351:19)
---
TypeError: undefined is not iterable (cannot read property Symbol(Symbol.iterator))
    at Object.<anonymous> (file:///home/charalampos.kardaris/src/vimium/tests/unit_tests/ui_component_test.js:28:25)
    at Object.runTest (file:///home/charalampos.kardaris/src/vimium/tests/vendor/shoulda.js:261:38)
    at eventLoopTick (ext:core/01_core.js:187:7)
    at async Object.runContext (file:///home/charalampos.kardaris/src/vimium/tests/vendor/shoulda.js:214:9)
    at async Object.run (file:///home/charalampos.kardaris/src/vimium/tests/vendor/shoulda.js:187:7)
    at async runUnitTests (file:///home/charalampos.kardaris/src/vimium/make.js:283:10)
    at async Task.<anonymous> (file:///home/charalampos.kardaris/src/vimium/make.js:351:19)
    at async Promise.all (index 0)
    at async TaskRegistry.execute (https://deno.land/x/drake@v1.5.1/lib/tasks.ts:446:5)
    at async TaskRegistry.run (https://deno.land/x/drake@v1.5.1/lib/tasks.ts:379:9)
Fail (1/244)
error: test-unit failed

- Collect tests in sub-directories.
- Fix loading of settings for tests.
@ckardaris ckardaris force-pushed the fix-test-configuration branch from a2e7bd0 to a40d86d Compare March 29, 2026 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant