import 'mocha' ; import { expect } from 'chai' ; import { parseProjectInformation } from '@/application/Parser/ProjectInformationParser' ; import { getProcessEnvironmentStub } from '@tests/unit/stubs/ProcessEnvironmentStub' ; describe ( 'ProjectInformationParser' , ( ) => { describe ( 'parseProjectInformation' , ( ) => { it ( 'parses expected repository version' , ( ) => { const expected = 'expected-version' ; const env = getProcessEnvironmentStub ( ) ; env . VUE_APP_VERSION = expected ; const info = parseProjectInformation ( env ) ; expect ( info . version ) . to . be . equal ( expected ) ; } ) ; it ( 'parses expected repository url' , ( ) => { const expected = 'https://expected-repository.url' ; const env = getProcessEnvironmentStub ( ) ; env . VUE_APP_REPOSITORY_URL = expected ; const info = parseProjectInformation ( env ) ; expect ( info . repositoryUrl ) . to . be . equal ( expected ) ; } ) ; it ( 'parses expected name' , ( ) => { const expected = 'expected-app-name' ; const env = getProcessEnvironmentStub ( ) ; env . VUE_APP_NAME = expected ; const info = parseProjectInformation ( env ) ; expect ( info . name ) . to . be . equal ( expected ) ; } ) ; it ( 'parses expected homepage url' , ( ) => { const expected = 'https://expected.sexy' ; const env = getProcessEnvironmentStub ( ) ; env . VUE_APP_HOMEPAGE_URL = expected ; const info = parseProjectInformation ( env ) ; expect ( info . homepage ) . to . be . equal ( expected ) ; } ) ; } ) ; } ) ;