Repository used as submodules in dependencies to provide typing for test cases suites.
- In the targetted repository,
cd
to the folder to add this repo as a submodule. - Execute
git submodule add https://github.com/Labortem/ts_test_cases_structure
- Provide authentication is required. The repo should be cloned in the folder.
- In the test suites, you can import anything you need from the repo. All you need is located in the
src/features
folders. - You may need to add a TS import path alias to your
tsconfig.json
to improve readability of the imports. In yourtsconfig.json
, add a new path alias into thecompilerOptions.paths
array, eg.:"@testCasesStructure" : ["path/to/submodule/src/features"]
. This will be only import you need as all you need is packaged in aindex.ts
(import { instanceOf, TestCasesOfStaticClassMethod } from "@testCasesStructure"
) - To update the submodule,
cd
into it, then pull the updates withgit pull
. We recommend to only pullmaster
branch.
- This repo is not intended to be modified when used as submodule. If you want to provide modifications, please clone the repo and open pull request as usual.
- If using VScode, the
NPM scripts
section will detect the submodule scripts. To prevent it, you may add the submodule into thefiles.exclude
config of the repo.vscode/settings.json
:"path/to/submodule": true