Commit 5a5484e7 authored by Tifenn Guillas's avatar Tifenn Guillas
Browse files

WIP: init tests

parent da2f1319
......@@ -12,9 +12,10 @@ list:
@echo " start > run a dev server for anis client application (in memory)"
@echo " stop > stop the dev server for anis client application"
@echo " restart > restart the dev server for anis client (container)"
@echo " test > run anis client tests"
@echo " ng-build > generate the angular dist application (html, css, js)"
@echo " log > display anis client container logs"
@echo " debug > shell into anis client container"
@echo " shell > shell into anis client container"
@echo ""
install:
......@@ -26,6 +27,7 @@ start:
@docker build -t anis-node conf-dev && docker run --init -it --rm --user $(UID):$(GID) \
--name anis-client \
-p 4200:4200 \
-p 9876:9876 \
-v $(CURDIR):/project -d \
-w /project anis-node ng serve --host=0.0.0.0 --disable-host-check --port 4200
......@@ -36,6 +38,13 @@ stop:
restart: stop start
test:
@docker build -t anis-node conf-dev && docker run --init -it --rm --user $(UID):$(GID) \
--name anis-client \
-p 9876:9876 \
-v $(CURDIR):/project -d \
-w /project anis-node ng test
ng-build:
@docker build -t anis-node conf-dev && docker run --init -it --rm --user $(UID):$(GID) \
-v $(CURDIR):/project \
......@@ -44,5 +53,5 @@ ng-build:
log:
@docker logs -f -t anis-client
debug:
shell:
@docker exec -ti anis-client bash
......@@ -8,6 +8,7 @@ module.exports = function (config) {
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-firefox-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma')
......@@ -16,7 +17,7 @@ module.exports = function (config) {
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, './coverage/anis-client'),
// dir: require('path').join(__dirname, './coverage/anis-client'),
reports: ['html', 'lcovonly', 'text-summary'],
fixWebpackSourcePaths: true
},
......@@ -25,7 +26,7 @@ module.exports = function (config) {
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
browsers: ['Firefox'],
singleRun: false,
restartOnFileChange: true
});
......
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { AccountBenefitsComponent } from './account-benefits.component';
describe('AccountBenefitsComponent', () => {
let component: AccountBenefitsComponent;
let fixture: ComponentFixture<AccountBenefitsComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ AccountBenefitsComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(AccountBenefitsComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
......@@ -3426,6 +3426,11 @@ is-wsl@^1.1.0:
resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d"
integrity sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=
is-wsl@^2.1.0:
version "2.1.1"
resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.1.1.tgz#4a1c152d429df3d441669498e2486d3596ebaf1d"
integrity sha512-umZHcSrwlDHo2TGMXv0DZ8dIUGunZ2Iv68YZnrmCiBPkZ4aaOhtv7pXJKeki9k3qJ3RJr0cDyitcl5wEH3AYog==
isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
......@@ -3718,6 +3723,13 @@ karma-coverage-istanbul-reporter@~2.0.1:
istanbul-api "^2.1.1"
minimatch "^3.0.4"
karma-firefox-launcher@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/karma-firefox-launcher/-/karma-firefox-launcher-1.2.0.tgz#64fe03dd10300f9754d48f9ebfbf31f6c94a200c"
integrity sha512-j9Zp8M8+VLq1nI/5xZGfzeaEPtGQ/vk3G+Y8vpmFWLvKLNZ2TDjD6cu2dUu7lDbu1HXNgatsAX4jgCZTkR9qhQ==
dependencies:
is-wsl "^2.1.0"
karma-jasmine-html-reporter@^1.4.0:
version "1.4.2"
resolved "https://registry.yarnpkg.com/karma-jasmine-html-reporter/-/karma-jasmine-html-reporter-1.4.2.tgz#16d100fd701271192d27fd28ddc90b710ad36fff"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment