$ stack test
foo1-0.1.0.0: unregistering (local file changes: test/Unused.hs)
foo2-0.1.0.0: unregistering (missing dependencies: foo1)
foo1-0.1.0.0: build
Warning: module not listed in foo1.cabal for 'foo1-test' component (add to other-modules): Unused
foo1-0.1.0.0: install
foo2-0.1.0.0: configure
foo1-0.1.0.0: build (test)
foo1-0.1.0.0: test (suite: foo1-test)
foo2-0.1.0.0: build
foo2-0.1.0.0: install
foo2-0.1.0.0: configure (test)
foo2-0.1.0.0: build (test)
foo2-0.1.0.0: test (suite: foo2-test)
Completed all 4 actions.