contructor.test.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435
  1. import { loadEnv } from './vm'
  2. import * as window from '../src/window'
  3. describe('contructor', () => {
  4. it()
  5. //it('img instanceof of HTMLImageElement', () => {
  6. //const img = window.document.createElement('img')
  7. //expect(img instanceof window.HTMLElement).toEqual(true)
  8. //expect(img instanceof window.HTMLImageElement).toEqual(true)
  9. //})
  10. //it('canvas instance of HTMLCanvasElement', () => {
  11. //const canvas = window.document.createElement('canvas')
  12. //expect(canvas instanceof window.HTMLElement).toEqual(true)
  13. //expect(canvas instanceof window.HTMLCanvasElement).toEqual(true)
  14. //})
  15. //it('audio instance of HTMLAudioElement', () => {
  16. //const audio = window.document.createElement('audio')
  17. //expect(audio instanceof window.HTMLElement).toEqual(true)
  18. //expect(audio instanceof window.HTMLAudioElement).toEqual(true)
  19. //})
  20. //it('ctx instance of CanvasRenderingContext2D', () => {
  21. //const canvas = window.document.createElement('canvas')
  22. //const ctx = canvas.getContext('2d')
  23. //expect(ctx instanceof window.CanvasRenderingContext2D).toEqual(true)
  24. //})
  25. //it('ctx instance of WebGLRenderingContext', () => {
  26. //const canvas = window.document.createElement('canvas')
  27. //const ctx = canvas.getContext('webgl')
  28. //expect(ctx instanceof window.WebGLRenderingContext).toEqual(true)
  29. //})
  30. })