Repository used as submodules in dependencies to provide typing for test cases suites.
- In the targetted repository,
cdto 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/featuresfolders. - You may need to add a TS import path alias to your
tsconfig.jsonto improve readability of the imports. In yourtsconfig.json, add a new path alias into thecompilerOptions.pathsarray, 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,
cdinto it, then pull the updates withgit pull. We recommend to only pullmasterbranch.
- 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 scriptssection will detect the submodule scripts. To prevent it, you may add the submodule into thefiles.excludeconfig of the repo.vscode/settings.json:"path/to/submodule": true