* CreateNewApp spec flaky fix * fix * Moved RepoLimit to commented files * Inline spec failure fix - case 19 * Table FIlter specs V1/V2 split * Binding/Table_Property_ToggleJs spec - V1/V2 fix * Spec name update * Wait increase * DS - duplicate error capture fix * revert * Recaptcha spec fix * Jsfun exe flaky fix - unskipped case * jsfunc exec spec fix * jsfunex spec fix * Api bugs spec fix * Api bugs spec fix * Chartdata point spec flaky fix * Theme_multiselect brown type fix * Jsfunc exe spec fix * Inline spec fix * Inline spec fix * Inline spec fix * Theme multiselect spec fix * Promises spec fix * JSFun Exe spec fix * Api_all verb methods update * List1 spec 4th case fix * Jsfun exe skipping 10th case * jsunf exe 10th case trial fix * firestore stub error capture * jsonload failng spec skip * JSonload spec fix * json load spec fix * Git repo moved back
26 lines
603 B
TypeScript
26 lines
603 B
TypeScript
import { faker } from "@faker-js/faker";
|
|
|
|
type imageTypes = "abstract" | "animals";
|
|
|
|
export class FakerHelper {
|
|
public GetCatImage() {
|
|
return faker.image.cats();
|
|
}
|
|
|
|
public GetRandomImage() {
|
|
return faker.image.imageUrl();
|
|
}
|
|
|
|
public GetRandomText(textLength = 10, casing : "upper" | "lower" | "mixed" = "mixed") {
|
|
return faker.random.alphaNumeric(textLength, { casing: casing });
|
|
}
|
|
|
|
public GetUSPhoneNumber() {
|
|
return faker.phone.number("(###) ###-####");
|
|
}
|
|
|
|
public GetRandomNumber(length = 6) {
|
|
return faker.random.numeric(length, {allowLeadingZeros: true});
|
|
}
|
|
}
|