Added stub for @farmmaps/common
This commit is contained in:
25
projects/common/src/lib/common.component.spec.ts
Normal file
25
projects/common/src/lib/common.component.spec.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { CommonComponent } from './common.component';
|
||||
|
||||
describe('CommonComponent', () => {
|
||||
let component: CommonComponent;
|
||||
let fixture: ComponentFixture<CommonComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ CommonComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(CommonComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
19
projects/common/src/lib/common.component.ts
Normal file
19
projects/common/src/lib/common.component.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'lib-common',
|
||||
template: `
|
||||
<p>
|
||||
common works!
|
||||
</p>
|
||||
`,
|
||||
styles: []
|
||||
})
|
||||
export class CommonComponent implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
}
|
10
projects/common/src/lib/common.module.ts
Normal file
10
projects/common/src/lib/common.module.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonComponent } from './common.component';
|
||||
|
||||
@NgModule({
|
||||
declarations: [CommonComponent],
|
||||
imports: [
|
||||
],
|
||||
exports: [CommonComponent]
|
||||
})
|
||||
export class CommonModule { }
|
12
projects/common/src/lib/common.service.spec.ts
Normal file
12
projects/common/src/lib/common.service.spec.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
import { CommonService } from './common.service';
|
||||
|
||||
describe('CommonService', () => {
|
||||
beforeEach(() => TestBed.configureTestingModule({}));
|
||||
|
||||
it('should be created', () => {
|
||||
const service: CommonService = TestBed.get(CommonService);
|
||||
expect(service).toBeTruthy();
|
||||
});
|
||||
});
|
9
projects/common/src/lib/common.service.ts
Normal file
9
projects/common/src/lib/common.service.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class CommonService {
|
||||
|
||||
constructor() { }
|
||||
}
|
7
projects/common/src/public-api.ts
Normal file
7
projects/common/src/public-api.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
/*
|
||||
* Public API Surface of common
|
||||
*/
|
||||
|
||||
export * from './lib/common.service';
|
||||
export * from './lib/common.component';
|
||||
export * from './lib/common.module';
|
22
projects/common/src/test.ts
Normal file
22
projects/common/src/test.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
||||
|
||||
import 'core-js/es7/reflect';
|
||||
import 'zone.js/dist/zone';
|
||||
import 'zone.js/dist/zone-testing';
|
||||
import { getTestBed } from '@angular/core/testing';
|
||||
import {
|
||||
BrowserDynamicTestingModule,
|
||||
platformBrowserDynamicTesting
|
||||
} from '@angular/platform-browser-dynamic/testing';
|
||||
|
||||
declare const require: any;
|
||||
|
||||
// First, initialize the Angular testing environment.
|
||||
getTestBed().initTestEnvironment(
|
||||
BrowserDynamicTestingModule,
|
||||
platformBrowserDynamicTesting()
|
||||
);
|
||||
// Then we find all the tests.
|
||||
const context = require.context('./', true, /\.spec\.ts$/);
|
||||
// And load the modules.
|
||||
context.keys().map(context);
|
Reference in New Issue
Block a user