mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-20 02:37:41 -05:00
* 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
26 lines
549 B
TypeScript
26 lines
549 B
TypeScript
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>')
|
|
})
|
|
|
|
})
|