mirror of
https://github.com/PaulHatch/semantic-version.git
synced 2025-12-27 04:58:17 +00:00
Set Jest config file in package script Include module path Include tests in project folders Remove index module exports Hardcode configuration parameters Move parameter binding into main run function Use alias imports Run test sequentially Remove cleanup (async conflict) Revert Jest option Increase test timeout to 15 seconds
13 lines
517 B
TypeScript
13 lines
517 B
TypeScript
import { ActionConfig } from '../ActionConfig';
|
|
import { UserInfo } from '../providers/UserInfo';
|
|
import { UserFormatter } from './UserFormatter';
|
|
|
|
export class JsonUserFormatter implements UserFormatter {
|
|
constructor(config: ActionConfig) {
|
|
// placeholder for consistency with other formatters
|
|
}
|
|
public Format(type: string, users: UserInfo[]): string {
|
|
let result: any = users.map(u => ({ name: u.name, email: u.email }));
|
|
return JSON.stringify(result).replace('\n', '');
|
|
}
|
|
}
|