Skip to content
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

Unit testing #1

Closed
wants to merge 24 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
4262d86
Upgrade to angular 17
tmrdlt Jan 11, 2024
840b3a1
Add /.angular/cache to .gitignore
tmrdlt Jan 11, 2024
29720bf
Update peerDependencies, author and repository in package.json, updat…
tmrdlt Jan 15, 2024
3981541
Update Angular Version Compatibility section in README.md
tmrdlt Jan 15, 2024
7b67eba
Add unit tests for TagCommanderService
tmrdlt Jan 16, 2024
fab0a32
Fix sample app tests
tmrdlt Jan 16, 2024
b494a54
Migrate from tslint to eslint
tmrdlt Jan 16, 2024
0648804
Remove deprecated protractor
tmrdlt Jan 16, 2024
e45e6be
Fix sample app linting errors
tmrdlt Jan 16, 2024
2565f7c
Add github action for linting and testing
tmrdlt Jan 16, 2024
99cb8d9
Delete tslint.json files
tmrdlt Jan 17, 2024
db45b89
Add tests for TcEventDirective and TcSetVarsDirective
tmrdlt Jan 17, 2024
6084df5
Test reloadContainer on route change in TagCommanderService spec
tmrdlt Jan 17, 2024
ac1885e
Re-add cycle.ong, ddd font
tmrdlt Jan 17, 2024
7ede096
Render readme in sample app, add postbuild and postinstall hooks to c…
tmrdlt Jan 17, 2024
018bef3
Fix tests
tmrdlt Jan 17, 2024
a8d2727
Change name of shop items
tmrdlt Jan 18, 2024
056fb73
Update documentation
tmrdlt Jan 18, 2024
2a1db36
Add section about SSR to README.md
tmrdlt Jan 23, 2024
b5a1dca
Adds CONTRIBUTE.md
kenodressel Jan 23, 2024
fc48478
Move log in reloadContainer to the actual moment of reloading
tmrdlt Jan 23, 2024
14e25bc
Adjust wrapper functions parameter namings for consistency
tmrdlt Jan 25, 2024
d60bdd5
Update documentation link
tmrdlt Jan 25, 2024
2782139
Update link in section about Exclusions
tmrdlt Jan 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"root": true,
"ignorePatterns": [
"projects/**/*"
],
"overrides": [
{
"files": [
"*.ts"
],
"parserOptions": {
"project": [
"tsconfig.json"
],
"createDefaultProgram": true
},
"extends": [
"plugin:@angular-eslint/recommended",
"plugin:@angular-eslint/template/process-inline-templates"
],
"rules": {
"@angular-eslint/component-selector": [
"error",
{
"prefix": "app",
"style": "kebab-case",
"type": "element"
}
],
"@angular-eslint/directive-selector": [
"error",
{
"prefix": "app",
"style": "camelCase",
"type": "attribute"
}
],
"@angular-eslint/no-empty-lifecycle-method": "off"
}
},
{
"files": [
"*.html"
],
"extends": [
"plugin:@angular-eslint/template/recommended"
],
"rules": {}
}
]
}
36 changes: 36 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: CI

on:
push:
branches:
- master
pull_request:
types:
- opened
- synchronize

jobs:
test:
name: Lint & Test
runs-on: ubuntu-latest

steps:
- name: Checkout Code
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18

- name: Install Dependencies
run: npm install

- name: Lint
run: npm run lint

- name: Test
run: npm run test -- --watch=false --browsers=ChromeHeadlessCustom

- name: Test sample app
run: npm run test-sample-app -- --watch=false --browsers=ChromeHeadlessCustom
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ yarn-error.log
testem.log
/typings
.tool-versions
/.angular/cache

# System Files
.DS_Store
Thumbs.db

# Sample App Documentation
/src/assets/documentation.md
115 changes: 115 additions & 0 deletions CONTRIBUTE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
# Contribute to ngx-tag-commander

We're delighted that you're interested in contributing to ngx-tag-commander! This document is intended to outline the process and guidelines for contributing to this repository. We want to make contributing to this project as easy and transparent as possible.

## Getting Started

1. **Fork the repository**

Start by forking the repository on GitHub. This will create a personal copy for you to work on.

2. **Clone your fork**

Clone your fork to your local machine. Replace `your-username` with your GitHub username.

```bash
git clone https://github.com/your-username/ngx-tag-commander.git
```

3. **Set up remote upstream**

Add the original repository as an upstream remote to your local repository.

```bash
git remote add upstream https://github.com/CommandersAct/ngx-tag-commander.git
```

4. **Install dependencies**

Navigate to the project directory and install its dependencies.

```bash
cd ngx-tag-commander
npm install
```

## Making Changes

1. **Create a branch**

Create a new branch for your changes.

```bash
git checkout -b feature/my-new-feature
```

2. **Make your changes**

Edit, add, or delete files as necessary for your contribution.

3. **Follow the coding standards**

Ensure your code adheres to the coding standards used throughout the project.

4. **Write tests**

If you're adding new functionality, please write tests to accompany it.

5. **Run the tests**

Ensure all tests pass before submitting your changes.

```bash
npm run test
```

6. **Document your changes**

Update the documentation to reflect any changes you have made.

7. **Update the Sample App**

Update the sample app found in `src` to reflect any changes you have made. Ensure that it is still running and add new examples if possible to illustrate your changes.


## Submitting Changes

1. **Commit your changes**

Commit your changes with a clear and descriptive commit message.

```bash
git commit -m "Add a brief description of your changes"
```

2. **Fetch upstream changes**

Fetch any recent changes from the upstream master branch.

```bash
git fetch upstream
```

3. **Rebase your branch**

Rebase your branch on top of the upstream master.

```bash
git rebase upstream/master
```

4. **Push your changes**

Push your changes to your fork.

```bash
git push origin feature/my-new-feature
```

5. **Create a pull request**

Go to your fork on GitHub and create a pull request against the [CommandersAct/ngx-tag-commander](https://github.com/CommandersAct/ngx-tag-commander) 's master branch.

## Reporting Issues

If you find any bugs or have a feature request, please create an issue on GitHub using the issue tracker.
Loading
Loading