-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Lexus Drumgold <[email protected]>
- Loading branch information
1 parent
01fceab
commit afd107e
Showing
12 changed files
with
122 additions
and
50 deletions.
There are no files selected for viewing
This file contains 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 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 |
---|---|---|
|
@@ -379,9 +379,6 @@ jobs: | |
- id: pack | ||
name: Pack project | ||
run: yarn pack -o ${{ env.TARFILE }} | ||
- id: typecheck | ||
name: Run typecheck | ||
run: yarn check:types:build | ||
- id: archive | ||
name: Archive production artifacts | ||
uses: actions/[email protected] | ||
|
This file contains 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
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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 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,16 @@ | ||
/** | ||
* @file Type Tests - RepositoryQuery | ||
* @module repostructure/queries/tests/unit-d/RepositoryQuery | ||
*/ | ||
|
||
import type TestSubject from '../repository.query' | ||
|
||
describe('unit-d:queries/RepositoryQuery', () => { | ||
it('should match [owner: string]', () => { | ||
expectTypeOf<TestSubject>().toHaveProperty('owner').toEqualTypeOf<string>() | ||
}) | ||
|
||
it('should match [repo: string]', () => { | ||
expectTypeOf<TestSubject>().toHaveProperty('repo').toEqualTypeOf<string>() | ||
}) | ||
}) |
8 changes: 4 additions & 4 deletions
8
...ls/queries/__tests__/labels.query.spec.ts → ...ueries/__tests__/repository.query.spec.ts
This file contains 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 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,6 @@ | ||
/** | ||
* @file Entry Point - Queries | ||
* @module repostructure/queries | ||
*/ | ||
|
||
export { default as RepositoryQuery } from './repository.query' |
This file contains 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,41 @@ | ||
/** | ||
* @file Queries - RepositoryQuery | ||
* @module repostructure/queries/RepositoryQuery | ||
*/ | ||
|
||
/** | ||
* Repository query. | ||
* | ||
* @class | ||
*/ | ||
class RepositoryQuery { | ||
/** | ||
* Repository owner. | ||
* | ||
* @public | ||
* @instance | ||
* @member {string} owner | ||
*/ | ||
public owner: string | ||
|
||
/** | ||
* Repository name. | ||
* | ||
* @public | ||
* @instance | ||
* @member {string} repo | ||
*/ | ||
public repo: string | ||
|
||
/** | ||
* Create a new repository query. | ||
* | ||
* @param {RepositoryQuery} params - Query parameters | ||
*/ | ||
constructor(params: RepositoryQuery) { | ||
this.owner = params.owner | ||
this.repo = params.repo | ||
} | ||
} | ||
|
||
export default RepositoryQuery |
30 changes: 30 additions & 0 deletions
30
src/subdomains/labels/queries/__tests__/labels.query.functional.spec.ts
This file contains 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,30 @@ | ||
/** | ||
* @file Functional Tests - LabelsQuery | ||
* @module repostructure/labels/queries/tests/functional/LabelsQuery | ||
*/ | ||
|
||
import OWNER from '#fixtures/owner.fixture' | ||
import REPO from '#fixtures/repo.fixture' | ||
import { RepositoryQuery } from '#src/queries' | ||
import TestSubject from '../labels.query' | ||
|
||
vi.mock('#src/queries/repository.query', () => ({ default: vi.fn() })) | ||
|
||
describe('functional:labels/queries/LabelsQuery', () => { | ||
describe('constructor', () => { | ||
it('should extend RepositoryQuery', () => { | ||
// Arrange | ||
const params: Record<'owner' | 'repo', string> = { | ||
owner: OWNER, | ||
repo: REPO | ||
} | ||
|
||
// Act | ||
new TestSubject(params) | ||
|
||
// Expect | ||
expect(RepositoryQuery).toHaveBeenCalledOnce() | ||
expect(RepositoryQuery).toHaveBeenCalledWith(params) | ||
}) | ||
}) | ||
}) |
This file contains 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 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