mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-19 18:27:29 -05:00
* implement proposal * update docs and replace py-env * more docs * suggested proposal * update docs * add to_file parameter * remove comment from Makefile * suggested improvements * move tests from basic to py_config * retain leading slash from the first path
24 lines
511 B
TypeScript
24 lines
511 B
TypeScript
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>')
|
|
})
|
|
|
|
})
|