-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add more unit and integration tests (#773)
* Add unit tests for pyloader and pytitle * Add more unit tests for pyrepl, pybox and pyinputbox * Add more tests for pyscript and pyconfig * White space * Fix d3 tests and improve more examples test * Update matplotlib test * Add numpy to dependencies * Address Madhur comments * Update test name
- Loading branch information
1 parent
d033ab0
commit b674515
Showing
12 changed files
with
482 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,8 @@ dependencies: | |
- isort | ||
- codespell | ||
- pre-commit | ||
- pillow | ||
- numpy | ||
|
||
- pip: | ||
- playwright | ||
|
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { jest } from "@jest/globals" | ||
|
||
import { PyBox } from "../../src/components/pybox" | ||
|
||
customElements.define('py-box', PyBox) | ||
|
||
describe('PyBox', () => { | ||
let instance: PyBox; | ||
|
||
beforeEach(() => { | ||
instance = new PyBox(); | ||
}) | ||
|
||
it('PyBox instantiates correctly', async () => { | ||
expect(instance).toBeInstanceOf(PyBox) | ||
}) | ||
|
||
it("test connectedCallback creates pybox div", async () => { | ||
expect(instance.innerHTML).toBe("") | ||
instance.connectedCallback() | ||
|
||
expect(instance.innerHTML).toBe('<div class=\"py-box\"></div>') | ||
}) | ||
|
||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.