Skip to content

Commit

Permalink
Fix the GitlabClientModule configuration and add documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ralf Ueberfuhr committed Oct 19, 2022
1 parent 6e031df commit 363716d
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,22 @@ import {createHttpFactory, HttpMethod, SpectatorHttp} from '@ngneat/spectator/je
import {DataSet, GitlabService} from './gitlab.service';
import {HttpTestingController} from '@angular/common/http/testing';
import {map, merge, take, toArray} from 'rxjs';
import {GitlabConfigProvider} from '../../config/gitlab-config.model';
import {GITLAB_CONFIG_PROVIDER} from '../../gitlab-client.module';
import {GitlabConfig} from '../../config/gitlab-config.model';

describe('GitlabService', () => {

// TODO test error when provider is null

const createHttp = createHttpFactory({
service: GitlabService,
providers: [
{
provide: GitlabConfigProvider,
useValue: GitlabConfigProvider.fromStatic({
provide: GITLAB_CONFIG_PROVIDER,
useValue: () => ({
host: 'host',
token: 'token'
})
} as GitlabConfig)
}
]
});
Expand Down

0 comments on commit 363716d

Please sign in to comment.