feat: init and fork some code from angular-auth-oidc-client
Some checks are pending
Build, Lint & Test Lib / Built, Lint and Test Library (push) Waiting to run
Build, Lint & Test Lib / Angular latest (push) Blocked by required conditions
Build, Lint & Test Lib / Angular latest & Schematics Job (push) Blocked by required conditions
Build, Lint & Test Lib / Angular latest Standalone & Schematics Job (push) Blocked by required conditions
Build, Lint & Test Lib / Angular 16 & RxJs 6 (push) Blocked by required conditions
Build, Lint & Test Lib / Angular V16 (push) Blocked by required conditions
Docs / Build and Deploy Docs Job (push) Waiting to run
Docs / Close Pull Request Job (push) Waiting to run
Some checks are pending
Build, Lint & Test Lib / Built, Lint and Test Library (push) Waiting to run
Build, Lint & Test Lib / Angular latest (push) Blocked by required conditions
Build, Lint & Test Lib / Angular latest & Schematics Job (push) Blocked by required conditions
Build, Lint & Test Lib / Angular latest Standalone & Schematics Job (push) Blocked by required conditions
Build, Lint & Test Lib / Angular 16 & RxJs 6 (push) Blocked by required conditions
Build, Lint & Test Lib / Angular V16 (push) Blocked by required conditions
Docs / Build and Deploy Docs Job (push) Waiting to run
Docs / Close Pull Request Job (push) Waiting to run
This commit is contained in:
35
src/validation/jwt-window-crypto.service.spec.ts
Normal file
35
src/validation/jwt-window-crypto.service.spec.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
import { TestBed, waitForAsync } from '@angular/core/testing';
|
||||
import { CryptoService } from '../utils/crypto/crypto.service';
|
||||
import { JwtWindowCryptoService } from './jwt-window-crypto.service';
|
||||
|
||||
describe('JwtWindowCryptoService', () => {
|
||||
let service: JwtWindowCryptoService;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [],
|
||||
providers: [JwtWindowCryptoService, CryptoService],
|
||||
});
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
service = TestBed.inject(JwtWindowCryptoService);
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(service).toBeTruthy();
|
||||
});
|
||||
|
||||
describe('generateCodeChallenge', () => {
|
||||
it('returns good result with correct codeVerifier', waitForAsync(() => {
|
||||
const outcome = 'R2TWD45Vtcf_kfAqjuE3LMSRF3JDE5fsFndnn6-a0nQ';
|
||||
const observable = service.generateCodeChallenge(
|
||||
'44445543344242132145455aaabbdc3b4'
|
||||
);
|
||||
|
||||
observable.subscribe((value) => {
|
||||
expect(value).toBe(outcome);
|
||||
});
|
||||
}));
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user