-
Notifications
You must be signed in to change notification settings - Fork 0
Chore/test build #5
New issue
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
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
8ffb8b6
feat(test): add build export smoke tests
rkovalov 76607ac
chore(changeset): add changeset for build test feature
rkovalov d0c0e9d
chore(config): add tsconfig for test folder
rkovalov fae1736
docs(test): fix script name in build test comment
rkovalov 4542d0c
chore(test): update source for test
rkovalov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| --- | ||
| --- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| import { withRslibConfig } from '@rstest/adapter-rslib'; | ||
| import { defineConfig } from '@rstest/core'; | ||
|
|
||
| export default defineConfig({ | ||
| extends: withRslibConfig(), | ||
| globals: true, | ||
| testEnvironment: 'node', | ||
| include: ['test/**/*.test.ts'], | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| /** | ||
| * Smoke tests that run against the compiled dist/ output. | ||
| * Verifies every public module is importable and all expected exports are present. | ||
| * Run after `pnpm build` via `pnpm test:build`. | ||
| */ | ||
|
|
||
| describe('@rstackio/services/safe', () => { | ||
| it('exports safe()', async () => { | ||
| const mod = await import('../dist/safe/index.js'); | ||
| expect(mod.safe).toBeTypeOf('function'); | ||
| }); | ||
| }); | ||
|
|
||
| describe('@rstackio/services/data-provider', () => { | ||
| it('exports createSafeProvider() and createProvider()', async () => { | ||
| const mod = await import('../dist/data-provider/index.js'); | ||
| expect(mod.createSafeProvider).toBeTypeOf('function'); | ||
| expect(mod.createProvider).toBeTypeOf('function'); | ||
| }); | ||
| }); | ||
|
|
||
| describe('@rstackio/services/mock', () => { | ||
| it('exports mock utilities', async () => { | ||
| const mod = await import('../dist/mock/index.js'); | ||
| expect(mod.isMockEnabled).toBeTypeOf('function'); | ||
| expect(mod.enableMock).toBeTypeOf('function'); | ||
| expect(mod.disableMock).toBeTypeOf('function'); | ||
| expect(mod.delay).toBeTypeOf('function'); | ||
| }); | ||
| }); | ||
|
|
||
| describe('@rstackio/services/logger', () => { | ||
| it('exports Logger class', async () => { | ||
| const mod = await import('../dist/logger/index.js'); | ||
| expect(mod.Logger).toBeTypeOf('function'); | ||
| }); | ||
| }); | ||
|
|
||
| describe('@rstackio/services/errors', () => { | ||
| it('is importable (type-only module)', async () => { | ||
| await expect(import('../dist/errors/index.js')).resolves.toBeDefined(); | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
| }); | ||
| }); | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| { | ||
| "extends": "../tsconfig.json", | ||
| "include": ["."] | ||
| } |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.