Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jchavarri committed Oct 26, 2023
1 parent b364efa commit 82d6021
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,13 @@ format-check: ## Checks if format is correct
watch: ## Watch for the filesystem and rebuild on every change
$(DUNE) build --watch

.PHONY: test
test: ## Run tests
$(DUNE) test

.PHONY: coverage
coverage: ## Generate coverage report in _coverage folder
$(DUNE) clean
BISECT_ENABLE=yes $(DUNE) build
$(DUNE) runtest || true # Jest will fail because dune & melange produce duplicated snapshots files with runtime_deps so it marks them as obsolete
$(DUNE) runtest
opam exec -- bisect-ppx-report html
3 changes: 3 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
module.exports = {
rootDir: "./_build/default/",
testMatch: ["**/*_test.js"],
// ignoring these, are they are just temporary copies from runtime_deps, the final ones are in
// the path with melange.emit target, e.g. _build/default/dom/test/test/dom/test/__snapshots__
modulePathIgnorePatterns: ["react/test/__snapshots__", "dom/test/__snapshots__"]
};

0 comments on commit 82d6021

Please sign in to comment.