Skip to content

Commit

Permalink
test(ng2-gauge): setup
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkgs committed Feb 4, 2024
1 parent d195d90 commit 62ed074
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 6 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/ng2-gauge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: 'ng2-gauge'
on: push

jobs:
lint-and-build:
lint-build-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -29,3 +29,5 @@ jobs:
run: npm run lint
- name: Build ng2-gauge
run: npm run build
- name: Test ng2-gauge
run: npm run test
6 changes: 4 additions & 2 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "projects/ng2-gauge/src/test.ts",
"tsConfig": "projects/ng2-gauge/tsconfig.spec.json",
"karmaConfig": "projects/ng2-gauge/karma.conf.js"
"polyfills": [
"zone.js",
"zone.js/testing"
]
}
},
"lint": {
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ng2-gauge",
"version": "1.2.0",
"version": "1.3.0",
"license": "MIT",
"author": "hawkgs (Georgi Serev)",
"keywords": [
Expand All @@ -23,7 +23,7 @@
"start": "ng serve demo-app",
"build": "ng build ng2-gauge && ts-node ./scripts/copy-readme.ts",
"watch:ng2-gauge": "ng build ng2-gauge --watch",
"test": "ng test",
"test": "ng test ng2-gauge",
"lint": "ng lint ng2-gauge"
},
"private": true,
Expand Down
2 changes: 1 addition & 1 deletion projects/ng2-gauge/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ng2-gauge",
"version": "1.2.0",
"version": "1.3.0",
"peerDependencies": {
"@angular/common": "^7.0.0",
"@angular/core": "^7.0.0"
Expand Down
28 changes: 28 additions & 0 deletions projects/ng2-gauge/src/lib/gauge.component.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { GaugeComponent } from './gauge.component';
import { CommonModule } from '@angular/common';

describe('GaugeComponent', () => {
let component: GaugeComponent;
let fixture: ComponentFixture<GaugeComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [CommonModule],
declarations: [GaugeComponent],
}).compileComponents();

fixture = TestBed.createComponent(GaugeComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});

describe('validators', () => {
it('should do something', () => {});
});
});

0 comments on commit 62ed074

Please sign in to comment.