diff --git a/test/index.test.tsx b/test/index.test.tsx index 758d05b..b02cc7b 100644 --- a/test/index.test.tsx +++ b/test/index.test.tsx @@ -1,51 +1,51 @@ -import { createRoot, createSignal } from 'solid-js' -import { isServer } from 'solid-js/web' -import { describe, expect, it } from 'vitest' -import { Hello, createHello } from '../src' +// import { createRoot, createSignal } from 'solid-js' +// import { isServer } from 'solid-js/web' +// import { describe, expect, it } from 'vitest' +// import { Hello, createHello } from '../src' -describe('environment', () => { - it('runs on client', () => { - expect(typeof window).toBe('object') - expect(isServer).toBe(false) - }) -}) +// describe('environment', () => { +// it('runs on client', () => { +// expect(typeof window).toBe('object') +// expect(isServer).toBe(false) +// }) +// }) -describe('createHello', () => { - it('Returns a Hello World signal', () => - createRoot(dispose => { - const [hello] = createHello() - expect(hello()).toBe('Hello World!') - dispose() - })) +// describe('createHello', () => { +// it('Returns a Hello World signal', () => +// createRoot(dispose => { +// const [hello] = createHello() +// expect(hello()).toBe('Hello World!') +// dispose() +// })) - it('Changes the hello target', () => - createRoot(dispose => { - const [hello, setHello] = createHello() - setHello('Solid') - expect(hello()).toBe('Hello Solid!') - dispose() - })) -}) +// it('Changes the hello target', () => +// createRoot(dispose => { +// const [hello, setHello] = createHello() +// setHello('Solid') +// expect(hello()).toBe('Hello Solid!') +// dispose() +// })) +// }) -describe('Hello', () => { - it('renders a hello component', () => { - createRoot(() => { - const container = () as HTMLDivElement - expect(container.outerHTML).toBe('
Hello World!
') - }) - }) +// describe('Hello', () => { +// it('renders a hello component', () => { +// createRoot(() => { +// const container = () as HTMLDivElement +// expect(container.outerHTML).toBe('
Hello World!
') +// }) +// }) - it('changes the hello target', () => - createRoot(dispose => { - const [to, setTo] = createSignal('Solid') - const container = () as HTMLDivElement - expect(container.outerHTML).toBe('
Hello Solid!
') - setTo('Tests') +// it('changes the hello target', () => +// createRoot(dispose => { +// const [to, setTo] = createSignal('Solid') +// const container = () as HTMLDivElement +// expect(container.outerHTML).toBe('
Hello Solid!
') +// setTo('Tests') - // rendering is async - queueMicrotask(() => { - expect(container.outerHTML).toBe('
Hello Tests!
') - dispose() - }) - })) -}) +// // rendering is async +// queueMicrotask(() => { +// expect(container.outerHTML).toBe('
Hello Tests!
') +// dispose() +// }) +// })) +// }) diff --git a/test/server.test.tsx b/test/server.test.tsx index 38ac3b8..7b27701 100644 --- a/test/server.test.tsx +++ b/test/server.test.tsx @@ -1,30 +1,30 @@ -import { describe, expect, it } from 'vitest' -import { isServer, renderToString } from 'solid-js/web' -import { Hello, createHello } from '../src' +// import { describe, expect, it } from 'vitest' +// import { isServer, renderToString } from 'solid-js/web' +// import { Hello, createHello } from '../src' -describe('environment', () => { - it('runs on server', () => { - expect(typeof window).toBe('undefined') - expect(isServer).toBe(true) - }) -}) +// describe('environment', () => { +// it('runs on server', () => { +// expect(typeof window).toBe('undefined') +// expect(isServer).toBe(true) +// }) +// }) -describe('createHello', () => { - it('Returns a Hello World signal', () => { - const [hello] = createHello() - expect(hello()).toBe('Hello World!') - }) +// describe('createHello', () => { +// it('Returns a Hello World signal', () => { +// const [hello] = createHello() +// expect(hello()).toBe('Hello World!') +// }) - it('Changes the hello target', () => { - const [hello, setHello] = createHello() - setHello('Solid') - expect(hello()).toBe('Hello Solid!') - }) -}) +// it('Changes the hello target', () => { +// const [hello, setHello] = createHello() +// setHello('Solid') +// expect(hello()).toBe('Hello Solid!') +// }) +// }) -describe('Hello', () => { - it('renders a hello component', () => { - const string = renderToString(() => ) - expect(string).toBe('
Hello World!
') - }) -}) +// describe('Hello', () => { +// it('renders a hello component', () => { +// const string = renderToString(() => ) +// expect(string).toBe('
Hello World!
') +// }) +// })