type
stringclasses
7 values
content
stringlengths
4
9.55k
repo
stringlengths
7
96
path
stringlengths
4
178
language
stringclasses
1 value
ClassDeclaration
export class RerouteParameters { allow_primary: boolean index: IndexName node: NodeName shard: integer from_node?: NodeName to_node?: NodeName }
dimitris-athanasiou/elasticsearch-specification
specification/cluster/reroute/types.ts
TypeScript
ClassDeclaration
@ApiTags('File Endpoint v15') @Controller('file') export class FileController { constructor( private fileService: FileService, @Inject(REQUEST) private requestCtx: IUserRequest & Request, ) {} @UseGuards(JwtAuthenticationGuard) @ApiOperation({ summary: 'Upload file production' }) @UseInterceptors(Fi...
vonhattruong250695/nestjs-docker-research
src/file/file.controller.ts
TypeScript
MethodDeclaration
@UseGuards(JwtAuthenticationGuard) @ApiOperation({ summary: 'Upload file production' }) @UseInterceptors(FileInterceptor('file')) @Post() public async uploadFile(@UploadedFile() file, @Res() res) { const result = await this.fileService.uploadPrivateFile( file.buffer, file.originalname, ); ...
vonhattruong250695/nestjs-docker-research
src/file/file.controller.ts
TypeScript
MethodDeclaration
@UseGuards(JwtAuthenticationGuard) @ApiOperation({ summary: 'Delete upload file' }) @UseInterceptors(FileInterceptor('file')) @Delete('/:id') public async deleteUploadFile(@Param('id') id: string, @Res() res) { await this.fileService.deletePrivateFile(id); return res.status(HttpStatus.OK).json(SUCCESS_...
vonhattruong250695/nestjs-docker-research
src/file/file.controller.ts
TypeScript
ArrowFunction
(): JSX.Element => ( <Layout title=""> <Stack align
CompositeFellow/bounty-board
packages/react-app/src/pages/400.tsx
TypeScript
EnumDeclaration
export enum SteamLoginErrors { MissingDetails = "MissingDetails", IncorrectDetails = "Error: Uncaught Error: The account name or password that you have entered is incorrect.", SteamGuard = "SteamGuard", SteamGuardMobile = "SteamGuardMobile", Captcha = "CAPTCHA", OldSession = "Old Session" }
automatedtf/butler
lib/enums/Login.ts
TypeScript
EnumDeclaration
export enum Steam2FAErrors { NoMobile = "Error 2" }
automatedtf/butler
lib/enums/Login.ts
TypeScript
ArrowFunction
content => { this.setContent(content); return super.load(credentials); }
Logeshdas/logesh-core
source/datasources/GoogleDriveDatasource.ts
TypeScript
ArrowFunction
err => { const { authFailure = false } = Layerr.info(err); if (!authFailure) { throw new Layerr(err, "Failed fetching Google Drive vault"); } else if (hasAuthed) { throw new Layerr(err, "Re-authentication failed"); ...
Logeshdas/logesh-core
source/datasources/GoogleDriveDatasource.ts
TypeScript
ArrowFunction
() => this.load(credentials, true)
Logeshdas/logesh-core
source/datasources/GoogleDriveDatasource.ts
TypeScript
ArrowFunction
err2 => { throw new Layerr(err2, "Failed fetching Google Drive vault"); }
Logeshdas/logesh-core
source/datasources/GoogleDriveDatasource.ts
TypeScript
ArrowFunction
encryptedContent => this.client.putFileContents({ id: this.fileID, contents: encryptedContent })
Logeshdas/logesh-core
source/datasources/GoogleDriveDatasource.ts
TypeScript
ArrowFunction
err => { const { authFailure = false } = Layerr.info(err); if (!authFailure) { throw new Layerr(err, "Failed saving Google Drive vault"); } else if (hasAuthed) { throw new Layerr(err, "Re-authentication failed"); } ...
Logeshdas/logesh-core
source/datasources/GoogleDriveDatasource.ts
TypeScript
ArrowFunction
() => this.save(history, credentials, true)
Logeshdas/logesh-core
source/datasources/GoogleDriveDatasource.ts
TypeScript
ArrowFunction
err2 => { throw new Layerr(err2, "Failed saving Google Drive vault"); }
Logeshdas/logesh-core
source/datasources/GoogleDriveDatasource.ts
TypeScript
ClassDeclaration
/** * Datasource for Google Drive archives * @augments TextDatasource * @memberof module:Buttercup */ export default class GoogleDriveDatasource extends TextDatasource { authManager: DatasourceAuthManager; client: any; fileID: string; token: string; refreshToken: string; /** * Datasour...
Logeshdas/logesh-core
source/datasources/GoogleDriveDatasource.ts
TypeScript
MethodDeclaration
/** * Load an archive from the datasource * @param {Credentials} credentials The credentials for decryption * @returns {Promise.<LoadedVaultData>} A promise that resolves archive history * @memberof GoogleDriveDatasource */ load(credentials, hasAuthed = false) { if (this.hasContent) { ...
Logeshdas/logesh-core
source/datasources/GoogleDriveDatasource.ts
TypeScript
MethodDeclaration
/** * Save an archive using the datasource * @param {Array.<String>} history The archive history to save * @param {Credentials} credentials The credentials to save with * @returns {Promise} A promise that resolves when saving has completed * @memberof GoogleDriveDatasource */ save(history,...
Logeshdas/logesh-core
source/datasources/GoogleDriveDatasource.ts
TypeScript
MethodDeclaration
/** * Whether or not the datasource supports bypassing remote fetch operations * @returns {Boolean} True if content can be set to bypass fetch operations, * false otherwise * @memberof GoogleDriveDatasource */ supportsRemoteBypass() { return true; }
Logeshdas/logesh-core
source/datasources/GoogleDriveDatasource.ts
TypeScript
MethodDeclaration
/** * Update the OAuth2 tokens * @param {String} accessToken The access token * @param {String=} refreshToken The refresh token * @memberof GoogleDriveDatasource */ updateTokens(accessToken, refreshToken) { this.token = accessToken; this.refreshToken = refreshToken; this...
Logeshdas/logesh-core
source/datasources/GoogleDriveDatasource.ts
TypeScript
ClassDeclaration
export default class AssetOptions extends Struct { constructor(registry: Registry, value: any) { super(registry, {initialIssuance: 'Compact<Balance>', permissions: PermissionLatest}, value); } get initialIssuance(): Balance { return this.get('initialIssuance') as Balance; } get permissions(): Permi...
dn3010/api.js
packages/types/src/runtime/ga/AssetOptions.ts
TypeScript
ClassDeclaration
@Component({ selector: 'uxd-components-number-picker', templateUrl: './number-picker.component.html' }) @DocumentationSectionComponent('ComponentsNumberPickerComponent') export class ComponentsNumberPickerComponent extends BaseDocumentationSection implements IPlaygroundProvider { form: FormGroup; pla...
TaraTodd123/UXAspects-2
docs/app/pages/components/components-sections/input-controls/number-picker/number-picker.component.ts
TypeScript
ArrowFunction
() => { const converter: FsTimestampConverter = new FsTimestampConverter(); describe('#fromJson()', () => { it('should convert timestamp to date', () => { const date: Date = converter.fromJson(Timestamp.fromDate(new Date(2020, 8))); expect(date.getMonth()).toEqual(8); expect(date.getFullYea...
paddls/ngx-repository
projects/ngx-firestore-repository/src/lib/converter/fs-timestamp.converter.spec.ts
TypeScript
ArrowFunction
() => { it('should convert timestamp to date', () => { const date: Date = converter.fromJson(Timestamp.fromDate(new Date(2020, 8))); expect(date.getMonth()).toEqual(8); expect(date.getFullYear()).toEqual(2020); }); it('should not convert null', () => { expect(converter.fromJson(nul...
paddls/ngx-repository
projects/ngx-firestore-repository/src/lib/converter/fs-timestamp.converter.spec.ts
TypeScript
ArrowFunction
() => { const date: Date = converter.fromJson(Timestamp.fromDate(new Date(2020, 8))); expect(date.getMonth()).toEqual(8); expect(date.getFullYear()).toEqual(2020); }
paddls/ngx-repository
projects/ngx-firestore-repository/src/lib/converter/fs-timestamp.converter.spec.ts
TypeScript
ArrowFunction
() => { expect(converter.fromJson(null)).toBeNull(); }
paddls/ngx-repository
projects/ngx-firestore-repository/src/lib/converter/fs-timestamp.converter.spec.ts
TypeScript
ArrowFunction
() => { expect(converter.fromJson(undefined)).toBeUndefined(); }
paddls/ngx-repository
projects/ngx-firestore-repository/src/lib/converter/fs-timestamp.converter.spec.ts
TypeScript
ArrowFunction
() => { it('should convert timestamp to date', () => { const timestamp: Timestamp = converter.toJson(new Date(2020, 8)); expect(timestamp.toDate().getMonth()).toEqual(8); expect(timestamp.toDate().getFullYear()).toEqual(2020); }); it('should not convert null', () => { expect(conver...
paddls/ngx-repository
projects/ngx-firestore-repository/src/lib/converter/fs-timestamp.converter.spec.ts
TypeScript
ArrowFunction
() => { const timestamp: Timestamp = converter.toJson(new Date(2020, 8)); expect(timestamp.toDate().getMonth()).toEqual(8); expect(timestamp.toDate().getFullYear()).toEqual(2020); }
paddls/ngx-repository
projects/ngx-firestore-repository/src/lib/converter/fs-timestamp.converter.spec.ts
TypeScript
ArrowFunction
() => { expect(converter.toJson(null)).toBeNull(); }
paddls/ngx-repository
projects/ngx-firestore-repository/src/lib/converter/fs-timestamp.converter.spec.ts
TypeScript
ArrowFunction
() => { expect(converter.toJson(undefined)).toBeUndefined(); }
paddls/ngx-repository
projects/ngx-firestore-repository/src/lib/converter/fs-timestamp.converter.spec.ts
TypeScript
ClassDeclaration
export default class LandAction extends React.PureComponent<Props> { render() { const { land, title, subtitle, children, onNavigate } = this.props return ( <div className="LandAction"> <Row height={48}> <Back absolute onClick={() => onNavigate(locations.landDetail(land.id))}
telestoworld/builder
src/components/LandAction/LandAction.tsx
TypeScript
MethodDeclaration
render() { const { land, title, subtitle, children, onNavigate } = this.props return ( <div className="LandAction"> <Row height={48}> <Back absolute onClick={() => onNavigate(locations.landDetail(land.id))}
telestoworld/builder
src/components/LandAction/LandAction.tsx
TypeScript
MethodDeclaration
title ? ( <Section
telestoworld/builder
src/components/LandAction/LandAction.tsx
TypeScript
ArrowFunction
([key, value]) => key.endsWith(".d.ts")
yuhr/distree
bundle.ts
TypeScript
ArrowFunction
() => 0.5
Evalon/motion
dev/tests/layout-shared-crossfade-a-ab.tsx
TypeScript
ArrowFunction
() => 0.1
Evalon/motion
dev/tests/layout-shared-crossfade-a-ab.tsx
TypeScript
ArrowFunction
() => { const params = new URLSearchParams(window.location.search) const type = params.get("type") || true const [state, setState] = React.useState(false) return ( <> <motion.div id="a" layoutId="box" layout={type} sty...
Evalon/motion
dev/tests/layout-shared-crossfade-a-ab.tsx
TypeScript
ArrowFunction
() => IOHelper.sizeOfUInt8
cronfoundation/cron-one
packages/neo-one-node-core/src/transaction/IssueTransaction.ts
TypeScript
ArrowFunction
async (options: TransactionGetScriptHashesForVerifyingOptions) => { const { getOutput, getAsset } = options; const [hashes, issuerHashes] = await Promise.all([ getScriptHashesForVerifying(options), this.getTransactionResults({ getOutput }).then(async (results) => Promise...
cronfoundation/cron-one
packages/neo-one-node-core/src/transaction/IssueTransaction.ts
TypeScript
ArrowFunction
async (results) => Promise.all( Object.entries(results) // tslint:disable-next-line no-unused .filter(([_, value]) => value.lt(utils.ZERO)) // tslint:disable-next-line no-unused .map(async ([assetHash, _]) => { ...
cronfoundation/cron-one
packages/neo-one-node-core/src/transaction/IssueTransaction.ts
TypeScript
ArrowFunction
([_, value]) => value.lt(utils.ZERO)
cronfoundation/cron-one
packages/neo-one-node-core/src/transaction/IssueTransaction.ts
TypeScript
ArrowFunction
async ([assetHash, _]) => { const asset = await getAsset({ hash: common.hexToUInt256(assetHash), }); return common.uInt160ToHex(asset.issuer); }
cronfoundation/cron-one
packages/neo-one-node-core/src/transaction/IssueTransaction.ts
TypeScript
ArrowFunction
(output) => common.uInt256Equal(output.asset, governingToken.hash) || common.uInt256Equal(output.asset, utilityToken.hash)
cronfoundation/cron-one
packages/neo-one-node-core/src/transaction/IssueTransaction.ts
TypeScript
ArrowFunction
async ([assetHex, value]) => { const hash = common.hexToUInt256(assetHex); const asset = await getAsset({ hash }); if (asset.amount.lt(utils.ZERO)) { return; } const issued = asset.available.add( memPool .filter((transaction) => transaction !== t...
cronfoundation/cron-one
packages/neo-one-node-core/src/transaction/IssueTransaction.ts
TypeScript
ArrowFunction
(transaction) => transaction !== this
cronfoundation/cron-one
packages/neo-one-node-core/src/transaction/IssueTransaction.ts
TypeScript
ArrowFunction
(acc, transaction) => transaction.outputs .filter((output) => common.uInt256Equal(hash, output.asset)) .reduce((innerAcc, output) => innerAcc.add(output.value), acc)
cronfoundation/cron-one
packages/neo-one-node-core/src/transaction/IssueTransaction.ts
TypeScript
ArrowFunction
(output) => common.uInt256Equal(hash, output.asset)
cronfoundation/cron-one
packages/neo-one-node-core/src/transaction/IssueTransaction.ts
TypeScript
ArrowFunction
(innerAcc, output) => innerAcc.add(output.value)
cronfoundation/cron-one
packages/neo-one-node-core/src/transaction/IssueTransaction.ts
TypeScript
ClassDeclaration
export class IssueTransaction extends TransactionBase< TransactionType.Issue, IssueTransactionJSON, Constructor<IssueTransactionModel<Attribute, Input, Output, Witness>> >(IssueTransactionModel) { public static deserializeWireBase(options: DeserializeWireBaseOptions): IssueTransaction { const { type, versi...
cronfoundation/cron-one
packages/neo-one-node-core/src/transaction/IssueTransaction.ts
TypeScript
InterfaceDeclaration
// tslint:disable-next-line export interface IssueTransactionAdd extends TransactionBaseAdd {}
cronfoundation/cron-one
packages/neo-one-node-core/src/transaction/IssueTransaction.ts
TypeScript
MethodDeclaration
public static deserializeWireBase(options: DeserializeWireBaseOptions): IssueTransaction { const { type, version } = super.deserializeTransactionBaseStartWireBase(options); if (type !== TransactionType.Issue) { throw new InvalidFormatError(`Expected transaction type to be ${TransactionType.Issue}. Recei...
cronfoundation/cron-one
packages/neo-one-node-core/src/transaction/IssueTransaction.ts
TypeScript
MethodDeclaration
public async serializeJSON(context: SerializeJSONContext): Promise<IssueTransactionJSON> { const transactionBaseJSON = await super.serializeTransactionBaseJSON(context); return { ...transactionBaseJSON, type: 'IssueTransaction', }; }
cronfoundation/cron-one
packages/neo-one-node-core/src/transaction/IssueTransaction.ts
TypeScript
MethodDeclaration
public getSystemFee(context: FeeContext): BN { if (this.version >= 1) { return utils.ZERO; } const { governingToken, utilityToken } = context; if ( this.outputs.every( (output) => common.uInt256Equal(output.asset, governingToken.hash) || common.uInt256Equal(outp...
cronfoundation/cron-one
packages/neo-one-node-core/src/transaction/IssueTransaction.ts
TypeScript
MethodDeclaration
public async getScriptHashesForVerifying( options: TransactionGetScriptHashesForVerifyingOptions, ): Promise<Set<UInt160Hex>> { return this.issueGetScriptHashesForVerifyingInternal(options); }
cronfoundation/cron-one
packages/neo-one-node-core/src/transaction/IssueTransaction.ts
TypeScript
MethodDeclaration
public async verify(options: TransactionVerifyOptions): Promise<readonly VerifyScriptResult[]> { const [results] = await Promise.all([super.verify(options), this.verifyInternal(options)]); return results; }
cronfoundation/cron-one
packages/neo-one-node-core/src/transaction/IssueTransaction.ts
TypeScript
MethodDeclaration
private async verifyInternal(options: TransactionVerifyOptions): Promise<void> { const { getOutput, getAsset, memPool = [] } = options; const results = await this.getTransactionResults({ getOutput }); await Promise.all( Object.entries(results).map(async ([assetHex, value]) => { const hash = c...
cronfoundation/cron-one
packages/neo-one-node-core/src/transaction/IssueTransaction.ts
TypeScript
FunctionDeclaration
export default function NetworkSettings() { const [pollingInterval, changePollingInterval] = useNetworkSettingsStore( (state) => [state.pollingInterval, state.changePollingInterval], shallow, ); return ( <div> <TextField variant="outlined" margin="normal" value={pollingI...
weilinzung/bull-monitor
packages/ui/src/components/Settings/Network/index.tsx
TypeScript
ArrowFunction
(state) => [state.pollingInterval, state.changePollingInterval]
weilinzung/bull-monitor
packages/ui/src/components/Settings/Network/index.tsx
TypeScript
ArrowFunction
(interval) => ( <MenuItem key={interval}
weilinzung/bull-monitor
packages/ui/src/components/Settings/Network/index.tsx
TypeScript
MethodDeclaration
ms(interval, { long: true }) : 'Disable'
weilinzung/bull-monitor
packages/ui/src/components/Settings/Network/index.tsx
TypeScript
ClassDeclaration
@Component({ selector: 'code-editor-demo', styleUrls: ['./code-editor.component.scss'], templateUrl: './code-editor.component.html', preserveWhitespaces: true, }) export class CodeEditorDemoComponent { editorVal: string = ` SELECT department_number, sampleid FROM department SAMPLE .25, .25, .50 ORDE...
akhedrane/covalent
src/app/content/components/component-demos/code-editor/code-editor.component.ts
TypeScript
FunctionDeclaration
// for libunboundWorker.jsm declare function postMessage(WorkerResponse: Libunbound.Log|Libunbound.Result|Libunbound.Exception): void;
leagris/dkim_verifier
globals.d.ts
TypeScript
InterfaceDeclaration
interface LibunboundWorker extends Worker { onmessage: (this: Worker, ev: WorkerResponse) => any; postMessage(message: LoadRequest|ResolveRequest|UpdateCtxRequest, transfer?: any[]): void; }
leagris/dkim_verifier
globals.d.ts
TypeScript
InterfaceDeclaration
interface Request { callId: number, method: string, }
leagris/dkim_verifier
globals.d.ts
TypeScript
InterfaceDeclaration
interface LoadRequest extends Request { method: "load", path: string, }
leagris/dkim_verifier
globals.d.ts
TypeScript
InterfaceDeclaration
interface ResolveRequest extends Request { method: "resolve", name: string, rrtype: number, }
leagris/dkim_verifier
globals.d.ts
TypeScript
InterfaceDeclaration
interface UpdateCtxRequest extends Request { method: "update_ctx", getNameserversFromOS: boolean, nameservers: string[], trustAnchors: string[], conf?: string, debuglevel?: number, }
leagris/dkim_verifier
globals.d.ts
TypeScript
InterfaceDeclaration
interface WorkerRequest extends MessageEvent { data: Request; }
leagris/dkim_verifier
globals.d.ts
TypeScript
InterfaceDeclaration
interface Log { type: string; // "log" subType: string; message: string; }
leagris/dkim_verifier
globals.d.ts
TypeScript
InterfaceDeclaration
interface Response { type?: string; callId: number; }
leagris/dkim_verifier
globals.d.ts
TypeScript
InterfaceDeclaration
interface Result extends Response { result: ub_result; }
leagris/dkim_verifier
globals.d.ts
TypeScript
InterfaceDeclaration
interface Exception extends Response { subType: string; message: string; }
leagris/dkim_verifier
globals.d.ts
TypeScript
InterfaceDeclaration
interface WorkerResponse extends MessageEvent { data: Log|Response; }
leagris/dkim_verifier
globals.d.ts
TypeScript
InterfaceDeclaration
// for dkimVerifier.jsm interface dkimResultCallback { (msgURI: string, result: dkimResultV1): void; }
leagris/dkim_verifier
globals.d.ts
TypeScript
InterfaceDeclaration
interface IDeferred<T> { promise: Promise<T>; resolve(reason: T): void; reject(reason: Error): void; }
leagris/dkim_verifier
globals.d.ts
TypeScript
ArrowFunction
() => { /* eslint-disable no-console */ console.log(`Listening on:`); console.log(` http://localhost:${PORT}/ - client only rendering`); console.log(` http://localhost:${PORT}/server - ssr with hydration`); /* eslint-enable no-console */ }
mushketyk/backend
packages/server/src/server-main.ts
TypeScript
ArrowFunction
(o, f) => (f ? f(o) : null)
Winterflower/kibana
x-pack/plugins/siem/public/mock/test_providers.tsx
TypeScript
ArrowFunction
({ children, store = createStore(state), mockFramework = mockFrameworks.default_UTC, onDragEnd = jest.fn(), }) => ( <I18nProvider> <ApolloProvider client={client}> <ReduxStoreProvider store
Winterflower/kibana
x-pack/plugins/siem/public/mock/test_providers.tsx
TypeScript
InterfaceDeclaration
interface Props { children: React.ReactNode; mockFramework?: Partial<AppTestingFrameworkAdapter>; store?: Store; onDragEnd?: (result: DropResult, provided: ResponderProvided) => void; }
Winterflower/kibana
x-pack/plugins/siem/public/mock/test_providers.tsx
TypeScript
TypeAliasDeclaration
export type IPermission = { actionId: string; id: string; menuId: string; roleId: string; status: string; };
Levie7/c-lisys
src/core/interface/permission.ts
TypeScript
TypeAliasDeclaration
export type PermissionState = { loading: boolean; error: string; data: IPermission[]; };
Levie7/c-lisys
src/core/interface/permission.ts
TypeScript
TypeAliasDeclaration
export type UpdatePermissionPayload = { actionId: string; menuId: string; roleId: string; status: string; };
Levie7/c-lisys
src/core/interface/permission.ts
TypeScript
FunctionDeclaration
function removeExtraSpaces(textS: string) { return `${textS}`.replace(/\s+/g, ' '); }
zewa666/aurelia-slickgrid
src/aurelia-slickgrid/filters/__tests__/compoundDateFilter.spec.ts
TypeScript
ArrowFunction
() => gridOptionMock
zewa666/aurelia-slickgrid
src/aurelia-slickgrid/filters/__tests__/compoundDateFilter.spec.ts
TypeScript
ArrowFunction
() => { ea = new EventAggregator(); i18n = new I18N(ea, new BindingSignaler()); divContainer = document.createElement('div'); divContainer.innerHTML = template; document.body.appendChild(divContainer); spyGetHeaderRow = jest.spyOn(gridStub, 'getHeaderRowColumn').mockReturnValue(divContainer); ...
zewa666/aurelia-slickgrid
src/aurelia-slickgrid/filters/__tests__/compoundDateFilter.spec.ts
TypeScript
ArrowFunction
() => { filter.destroy(); }
zewa666/aurelia-slickgrid
src/aurelia-slickgrid/filters/__tests__/compoundDateFilter.spec.ts
TypeScript
ArrowFunction
() => { expect(() => filter.init(null)).toThrowError('[Aurelia-SlickGrid] A filter must always have an "init()" with valid arguments.'); }
zewa666/aurelia-slickgrid
src/aurelia-slickgrid/filters/__tests__/compoundDateFilter.spec.ts
TypeScript
ArrowFunction
() => filter.init(null)
zewa666/aurelia-slickgrid
src/aurelia-slickgrid/filters/__tests__/compoundDateFilter.spec.ts
TypeScript
ArrowFunction
() => { filter.init(filterArguments); const filterCount = divContainer.querySelectorAll('.form-group.search-filter.filter-finish').length; expect(spyGetHeaderRow).toHaveBeenCalled(); expect(filterCount).toBe(1); }
zewa666/aurelia-slickgrid
src/aurelia-slickgrid/filters/__tests__/compoundDateFilter.spec.ts
TypeScript
ArrowFunction
() => { const testValue = 'test placeholder'; mockColumn.filter.placeholder = testValue; filter.init(filterArguments); const filterElm = divContainer.querySelector<HTMLInputElement>('.search-filter.filter-finish .flatpickr input.input'); expect(filterElm.placeholder).toBe(testValue); }
zewa666/aurelia-slickgrid
src/aurelia-slickgrid/filters/__tests__/compoundDateFilter.spec.ts
TypeScript
ArrowFunction
() => { filter.init(filterArguments); const spy = jest.spyOn(filter.flatInstance, 'close'); const calendarElm = document.body.querySelector<HTMLDivElement>('.flatpickr-calendar'); filter.hide(); expect(calendarElm).toBeTruthy(); expect(spy).toHaveBeenCalled(); }
zewa666/aurelia-slickgrid
src/aurelia-slickgrid/filters/__tests__/compoundDateFilter.spec.ts
TypeScript
ArrowFunction
() => { filter.init(filterArguments); const spy = jest.spyOn(filter.flatInstance, 'open'); const calendarElm = document.body.querySelector<HTMLDivElement>('.flatpickr-calendar'); filter.show(); expect(calendarElm).toBeTruthy(); expect(spy).toHaveBeenCalled(); }
zewa666/aurelia-slickgrid
src/aurelia-slickgrid/filters/__tests__/compoundDateFilter.spec.ts
TypeScript
ArrowFunction
() => { filter.init(filterArguments); expect(filter.flatInstance).toBeTruthy(); expect(filter.flatpickrOptions).toEqual({ altFormat: 'Y-m-d', altInput: true, closeOnSelect: true, dateFormat: 'Y-m-d', defaultDate: '', locale: 'en', onChange: expect.anything(), ...
zewa666/aurelia-slickgrid
src/aurelia-slickgrid/filters/__tests__/compoundDateFilter.spec.ts
TypeScript
ArrowFunction
() => { const mockDate = '2001-01-02T16:02:02.239Z'; filter.init(filterArguments); filter.setValues(mockDate); expect(filter.currentDate).toEqual(mockDate); }
zewa666/aurelia-slickgrid
src/aurelia-slickgrid/filters/__tests__/compoundDateFilter.spec.ts
TypeScript
ArrowFunction
() => { const mockDate = '2001-01-02T16:02:02.239Z'; filter.init(filterArguments); filter.setValues([mockDate]); expect(filter.currentDate).toEqual(mockDate); }
zewa666/aurelia-slickgrid
src/aurelia-slickgrid/filters/__tests__/compoundDateFilter.spec.ts
TypeScript
ArrowFunction
() => { const mockDate = '2001-01-02T16:02:02.239Z'; filter.init(filterArguments); filter.setValues([mockDate], OperatorType.greaterThanOrEqual); const filterOperatorElm = divContainer.querySelector<HTMLInputElement>('.input-group-prepend.operator select'); expect(filter.currentDate).toEqual(mock...
zewa666/aurelia-slickgrid
src/aurelia-slickgrid/filters/__tests__/compoundDateFilter.spec.ts
TypeScript
ArrowFunction
() => { mockColumn.filter.filterOptions = { allowInput: true }; // change to allow input value only for testing purposes mockColumn.filter.operator = '>'; const spyCallback = jest.spyOn(filterArguments, 'callback'); filter.init(filterArguments); const filterInputElm = divContainer.querySelector<HT...
zewa666/aurelia-slickgrid
src/aurelia-slickgrid/filters/__tests__/compoundDateFilter.spec.ts
TypeScript
ArrowFunction
() => { mockColumn.filter.filterOptions = { allowInput: true }; // change to allow input value only for testing purposes mockColumn.filter.operator = '>'; const spyCallback = jest.spyOn(filterArguments, 'callback'); filter.init(filterArguments); const filterInputElm = divContainer.querySelector<HT...
zewa666/aurelia-slickgrid
src/aurelia-slickgrid/filters/__tests__/compoundDateFilter.spec.ts
TypeScript
ArrowFunction
() => { filterArguments.searchTerms = ['2000-01-01T05:00:00.000Z']; mockColumn.filter.operator = '<='; const spyCallback = jest.spyOn(filterArguments, 'callback'); filter.init(filterArguments); const filterInputElm = divContainer.querySelector<HTMLInputElement>('.search-filter.filter-finish .flatp...
zewa666/aurelia-slickgrid
src/aurelia-slickgrid/filters/__tests__/compoundDateFilter.spec.ts
TypeScript