Add service specs #9
1 changed files with 20 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
||||||
import { TestBed, inject } from '@angular/core/testing';
|
import {inject, TestBed} from '@angular/core/testing';
|
||||||
|
|
||||||
import { NativeLibraryWrapperService } from './native-library-wrapper.service';
|
import {NativeLibraryWrapperService} from './native-library-wrapper.service';
|
||||||
|
|
||||||
describe('NativeLibraryWrapperService', () => {
|
describe('NativeLibraryWrapperService', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
@ -12,4 +12,22 @@ describe('NativeLibraryWrapperService', () => {
|
||||||
it('should be created', inject([NativeLibraryWrapperService], (service: NativeLibraryWrapperService) => {
|
it('should be created', inject([NativeLibraryWrapperService], (service: NativeLibraryWrapperService) => {
|
||||||
expect(service).toBeTruthy();
|
expect(service).toBeTruthy();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
it('should convert punycode', inject([NativeLibraryWrapperService], (service: NativeLibraryWrapperService) => {
|
||||||
|
expect(service.punycode).toBeTruthy();
|
||||||
|
expect(service.punycode.encode('bärneruhr')).toEqual('brneruhr-0za');
|
||||||
|
expect(service.punycode.decode('brneruhr-0za')).toEqual('bärneruhr');
|
||||||
|
}));
|
||||||
|
|
||||||
|
it('should convert utf8', inject([NativeLibraryWrapperService], (service: NativeLibraryWrapperService) => {
|
||||||
|
expect(service.utf8).toBeTruthy();
|
||||||
|
expect(service.utf8.encode('bärneruhr')).toEqual('bärneruhr');
|
||||||
|
expect(service.utf8.decode('bärneruhr')).toEqual('bärneruhr');
|
||||||
|
}));
|
||||||
|
|
||||||
|
it('should convert quoted printable', inject([NativeLibraryWrapperService], (service: NativeLibraryWrapperService) => {
|
||||||
|
expect(service.quotedPrintable).toBeTruthy();
|
||||||
|
expect(service.quotedPrintable.encode('bärneruhr')).toEqual('b=E4rneruhr');
|
||||||
|
expect(service.quotedPrintable.decode('b=E4rneruhr')).toEqual('bärneruhr');
|
||||||
|
}));
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue