| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| '@tanstack/create': patch | ||
| --- | ||
|
|
||
| Remove `memfs` from the published runtime dependencies by reusing the internal in-memory environment. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,35 @@ | ||
| import { describe, expect, it } from 'vitest' | ||
| import { readFile } from 'node:fs/promises' | ||
| import { afterEach, describe, expect, it, vi } from 'vitest' | ||
|
|
||
| import { createApp } from '../src/index.js' | ||
| afterEach(() => { | ||
| vi.doUnmock('memfs') | ||
| vi.resetModules() | ||
| }) | ||
|
|
||
| describe('index', () => { | ||
| it('should be a test', () => { | ||
| it('exports createApp', async () => { | ||
| const { createApp } = await import('../src/index.js') | ||
|
|
||
| expect(createApp).toBeDefined() | ||
| }) | ||
|
|
||
| it('does not import the test-only memory filesystem', async () => { | ||
| vi.resetModules() | ||
| vi.doMock('memfs', () => { | ||
| throw new Error('memfs is unavailable') | ||
| }) | ||
|
|
||
| const { createApp } = await import('../src/index.js') | ||
|
|
||
| expect(createApp).toBeDefined() | ||
| }) | ||
|
|
||
| it('does not publish the test-only memory filesystem', async () => { | ||
| const packageJSON = JSON.parse( | ||
| await readFile(new URL('../package.json', import.meta.url), 'utf8'), | ||
| ) | ||
|
|
||
| expect(packageJSON.dependencies).not.toHaveProperty('memfs') | ||
| expect(packageJSON.devDependencies).toHaveProperty('memfs') | ||
| }) | ||
| }) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Back | FazBrowse Home | New Git URL |
Uh oh!
There was an error while loading. Please reload this page.