Skip to content

Commit

Permalink
chore(library): fix bootstrap-italia import (#553)
Browse files Browse the repository at this point in the history
* chore(library): fix bootstrap-italia import

* fix(test): fix test import bootstrap-italia
  • Loading branch information
VincenzoDeSisto authored May 29, 2024
1 parent 0c4647b commit 7bbfd63
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion src/App.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,15 @@ import App from "./App";
import Header from "./components/layout/Header/Header";
import Main from "./components/layout/Main/Main";

// jest.mock("bootstrap-italia", () => ({ __esModule: true, default: jest.fn() }));
jest.mock("bootstrap-italia", () => {
return {
Modal: jest.fn().mockImplementation(() => {
return {
toggle: jest.fn()
};
})
};
});

jest.mock("./components/layout/Header/Header", () => ({
__esModule: true,
Expand Down
2 changes: 1 addition & 1 deletion src/global-bootstrap-italia.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Modal } from "bootstrap-italia";
import jquery from "jquery";
import Popper from "popper.js";
import Modal from "bootstrap/js/dist/modal";

window.__PUBLIC_PATH__ = "/fonts";
window.Popper = Popper;
Expand Down

0 comments on commit 7bbfd63

Please sign in to comment.