type stringclasses 7
values | content stringlengths 4 9.55k | repo stringlengths 7 96 | path stringlengths 4 178 | language stringclasses 1
value |
|---|---|---|---|---|
ArrowFunction |
p => {
let doWhat: string
switch (p.service) {
case 'phone':
doWhat = 'verify their phone number'
break
case 'email':
doWhat = 'verify their e-mail address'
break
default:
doWhat = `prove their ${upperFirst(p.service)}`
break
}
const url = 'https://keybase.io/ins... | SerenadeX/client-2 | shared/profile/user/index.tsx | TypeScript |
ArrowFunction |
p => {
let assertions: React.ReactNode
if (p.assertionKeys) {
assertions = [
...p.assertionKeys.map(a => <Assertion key={a} username={p.username} assertionKey={a} />),
...(p.suggestionKeys || []).map(s => (
<Assertion isSuggestion={true} key={s} username={p.username} assertionKey={s} />
... | SerenadeX/client-2 | shared/profile/user/index.tsx | TypeScript |
ArrowFunction |
a => <Assertion key | SerenadeX/client-2 | shared/profile/user/index.tsx | TypeScript |
ArrowFunction |
s => (
<Assertion isSuggestion={true} | SerenadeX/client-2 | shared/profile/user/index.tsx | TypeScript |
ArrowFunction |
() => this.props.onChangeFollowing(true) | SerenadeX/client-2 | shared/profile/user/index.tsx | TypeScript |
ArrowFunction |
() => this.props.onChangeFollowing(false) | SerenadeX/client-2 | shared/profile/user/index.tsx | TypeScript |
ArrowFunction |
following => (
<Kb.ClickableBox
onClick={following ? this._onClickFollowing : this._onClickFollowers} | SerenadeX/client-2 | shared/profile/user/index.tsx | TypeScript |
ArrowFunction |
width => {
const singleItemWidth = Styles.isMobile ? 130 : 120
const itemsInARow = Math.floor(Math.max(1, width / singleItemWidth))
const itemWidth = Math.floor(width / itemsInARow)
return {itemWidth, itemsInARow}
} | SerenadeX/client-2 | shared/profile/user/index.tsx | TypeScript |
ArrowFunction |
u => (
<Friend key={u} | SerenadeX/client-2 | shared/profile/user/index.tsx | TypeScript |
ArrowFunction |
(following: boolean) => {
this.setState(p => {
if (p.selectedFollowing === following) {
return null
}
const selectedFollowing = !p.selectedFollowing
usernameSelectedFollowing[this.props.username] = selectedFollowing
return {selectedFollowing}
})
} | SerenadeX/client-2 | shared/profile/user/index.tsx | TypeScript |
ArrowFunction |
p => {
if (p.selectedFollowing === following) {
return null
}
const selectedFollowing = !p.selectedFollowing
usernameSelectedFollowing[this.props.username] = selectedFollowing
return {selectedFollowing}
} | SerenadeX/client-2 | shared/profile/user/index.tsx | TypeScript |
ArrowFunction |
({section}) => {
if (section === this._bioTeamProofsSection) return null
if (this.props.notAUser) return null
const loading = !this.props.followers || !this.props.following
return (
<FriendshipTabs
key="tabs"
loading={loading}
numFollowers={this.props.followersCount}
... | SerenadeX/client-2 | shared/profile/user/index.tsx | TypeScript |
ArrowFunction |
({item, section, index}) =>
this.props.notAUser ? null : item.type === 'noFriends' || item.type === 'loading' ? (
<Kb.Box2 direction="horizontal" | SerenadeX/client-2 | shared/profile/user/index.tsx | TypeScript |
ArrowFunction |
() => (
<BioTeamProofs
onAddIdentity={this.props.onAddIdentity} | SerenadeX/client-2 | shared/profile/user/index.tsx | TypeScript |
ArrowFunction |
width => this.setState(p => (p.width !== width ? {width} : null)) | SerenadeX/client-2 | shared/profile/user/index.tsx | TypeScript |
ArrowFunction |
p => (p.width !== width ? {width} : null) | SerenadeX/client-2 | shared/profile/user/index.tsx | TypeScript |
ArrowFunction |
e => e.code !== RPCTypes.StatusCode.scresolutionfailed | SerenadeX/client-2 | shared/profile/user/index.tsx | TypeScript |
ClassDeclaration |
class FriendshipTabs extends React.Component<FriendshipTabsProps> {
_onClickFollowing = () => this.props.onChangeFollowing(true)
_onClickFollowers = () => this.props.onChangeFollowing(false)
_tab = following => (
<Kb.ClickableBox
onClick={following ? this._onClickFollowing : this._onClickFollowers}
... | SerenadeX/client-2 | shared/profile/user/index.tsx | TypeScript |
ClassDeclaration |
class FriendRow extends React.Component<FriendRowProps> {
shouldComponentUpdate(nextProps: FriendRowProps) {
return (
this.props.itemWidth !== nextProps.itemWidth || !shallowEqual(this.props.usernames, nextProps.usernames)
)
}
render() {
return (
<Kb.Box2 direction="horizontal" fullWidth... | SerenadeX/client-2 | shared/profile/user/index.tsx | TypeScript |
ClassDeclaration |
export class BioTeamProofs extends React.PureComponent<BioTeamProofsProps> {
render() {
const addIdentity = this.props.onAddIdentity ? (
<Kb.ButtonBar style={styles.addIdentityContainer}>
<Kb.Button
fullWidth={true}
onClick={this.props.onAddIdentity}
style={styles.addI... | SerenadeX/client-2 | shared/profile/user/index.tsx | TypeScript |
ClassDeclaration |
class User extends React.Component<Props, State> {
constructor(props: Props) {
super(props)
this.state = {
selectedFollowing: !!usernameSelectedFollowing[props.username],
width: Styles.dimensionWidth,
}
}
_changeFollowing = (following: boolean) => {
this.setState(p => {
if (p.s... | SerenadeX/client-2 | shared/profile/user/index.tsx | TypeScript |
TypeAliasDeclaration |
export type BackgroundColorType = 'red' | 'green' | 'blue' | SerenadeX/client-2 | shared/profile/user/index.tsx | TypeScript |
TypeAliasDeclaration |
export type Props = {
assertionKeys: Array<string> | null
backgroundColorType: BackgroundColorType
followThem: boolean
followers: Array<string> | null
followersCount: number
following: Array<string> | null
followingCount: number
notAUser: boolean
onAddIdentity: (() => void) | null
onBack: () => voi... | SerenadeX/client-2 | shared/profile/user/index.tsx | TypeScript |
TypeAliasDeclaration |
type FriendshipTabsProps = {
loading: boolean
onChangeFollowing: (arg0: boolean) => void
selectedFollowing: boolean
numFollowers: number
numFollowing: number
} | SerenadeX/client-2 | shared/profile/user/index.tsx | TypeScript |
TypeAliasDeclaration |
type FriendRowProps = {
usernames: Array<string>
itemWidth: number
} | SerenadeX/client-2 | shared/profile/user/index.tsx | TypeScript |
TypeAliasDeclaration |
export type BioTeamProofsProps = {
onAddIdentity: (() => void) | null
assertionKeys: Array<string> | null
backgroundColorType: BackgroundColorType
onEditAvatar: (() => void) | null
notAUser: boolean
suggestionKeys: Array<string> | null
username: string
reason: string
name: string
service: string
... | SerenadeX/client-2 | shared/profile/user/index.tsx | TypeScript |
TypeAliasDeclaration |
type State = {
selectedFollowing: boolean
width: number
} | SerenadeX/client-2 | shared/profile/user/index.tsx | TypeScript |
MethodDeclaration |
shouldComponentUpdate(nextProps: FriendRowProps) {
return (
this.props.itemWidth !== nextProps.itemWidth || !shallowEqual(this.props.usernames, nextProps.usernames)
)
} | SerenadeX/client-2 | shared/profile/user/index.tsx | TypeScript |
MethodDeclaration |
render() {
return (
<Kb.Box2 direction="horizontal" fullWidth={true} style={styles.friendRow}>
{this.props.usernames.map(u => (
<Friend key={u} username={u} width={this.props.itemWidth} />
))}
</Kb.Box2>
)
} | SerenadeX/client-2 | shared/profile/user/index.tsx | TypeScript |
MethodDeclaration |
render() {
const addIdentity = this.props.onAddIdentity ? (
<Kb.ButtonBar style={styles.addIdentityContainer}>
<Kb.Button
fullWidth={true}
onClick={this.props.onAddIdentity}
style={styles.addIdentityButton}
mode="Secondary"
label="Add more identities"... | SerenadeX/client-2 | shared/profile/user/index.tsx | TypeScript |
ArrowFunction |
(cxt) => {
// 获取嵌套页面最后一个的 layout
let layout = getMatchedComponents(cxt.route).reverse()[0].options.layout;
if (typeof layout === 'function') {
layout = layout(cxt);
}
return layout;
} | aceHubert/vue-plumemo-blog | po-admin/src/utils/vue-nested-layout.ts | TypeScript |
ClassDeclaration |
@Component({
layout: (cxt) => {
// 获取嵌套页面最后一个的 layout
let layout = getMatchedComponents(cxt.route).reverse()[0].options.layout;
if (typeof layout === 'function') {
layout = layout(cxt);
}
return layout;
},
})
export default class VueNestedLayout extends Vue {} | aceHubert/vue-plumemo-blog | po-admin/src/utils/vue-nested-layout.ts | TypeScript |
FunctionDeclaration |
async function run() {
const number =
context?.payload?.pull_request?.number ||
+core.getInput("number", { required: false });
if (isNaN(number) || number < 1) {
core.info("no numbers given: skip step");
return;
}
try {
const repo = context.repo;
const message = core.getInput("message"... | SvanBoxel/sticky-pull-request-comment | src/main.ts | TypeScript |
ClassDeclaration |
export class SelectionTool implements Tool {
mouseUp():string {
return "Selection tool: mouse up";
}
mouseDown():string {
return "Selection tool: mouse down";
}
} | MasumBhuiyan/design-patterns | src/state/SelectionTool.ts | TypeScript |
MethodDeclaration |
mouseUp():string {
return "Selection tool: mouse up";
} | MasumBhuiyan/design-patterns | src/state/SelectionTool.ts | TypeScript |
MethodDeclaration |
mouseDown():string {
return "Selection tool: mouse down";
} | MasumBhuiyan/design-patterns | src/state/SelectionTool.ts | TypeScript |
InterfaceDeclaration |
interface DuplexifyConstructor {
(writable?: stream.Writable, readable?: stream.Readable, streamOptions?: stream.DuplexOptions): duplexify.Duplexify;
new (writable?: stream.Writable, readable?: stream.Readable, streamOptions?: stream.DuplexOptions): duplexify.Duplexify;
} | 0916dhkim/DefinitelyTyped | types/duplexify/index.d.ts | TypeScript |
InterfaceDeclaration |
interface Duplexify extends stream.Duplex {
setWritable(writable: stream.Writable): void;
setReadable(readable: stream.Readable): void;
} | 0916dhkim/DefinitelyTyped | types/duplexify/index.d.ts | TypeScript |
ArrowFunction |
() => {
return (
<>
<Head>
<title>Pomodoro Clock</title>
</Head>
<Container>
<Title appName={'Pomodoro Clock'} />
<Clock />
</Container>
</> | evfjunior/nextjs-pomodoro-clock | pages/index.tsx | TypeScript |
ArrowFunction |
() => {
container = render(<Header />).container;
} | anjotadena/ts-react-tdd | src/components/Header/Header.test.tsx | TypeScript |
ArrowFunction |
() => {
expect(getByTestId(container, 'logo')).toBeTruthy();
} | anjotadena/ts-react-tdd | src/components/Header/Header.test.tsx | TypeScript |
ArrowFunction |
() => {
expect(getByTestId(container, 'search')).toBeTruthy();
} | anjotadena/ts-react-tdd | src/components/Header/Header.test.tsx | TypeScript |
ArrowFunction |
() => {
expect(getByTestId(container, 'menu')).toBeTruthy();
} | anjotadena/ts-react-tdd | src/components/Header/Header.test.tsx | TypeScript |
ArrowFunction |
() => {
expect(getByTestId(container, 'home-type')).toBeTruthy();
expect(getByTestId(container, 'dates')).toBeTruthy();
expect(getByTestId(container, 'guests')).toBeTruthy();
expect(getByTestId(container, 'price')).toBeTruthy();
expect(getByTestId(container, 'rooms')).toBeTruthy();
expect(getByTestId(conta... | anjotadena/ts-react-tdd | src/components/Header/Header.test.tsx | TypeScript |
ArrowFunction |
() => {
let page: AppPage;
beforeEach(() => {
page = new AppPage();
});
it('should display welcome message', () => {
page.navigateTo();
expect(page.getParagraphText()).toEqual('Welcome to base-application!');
});
} | 616799781/aofe.code | chapter10/nginx-microfrontends/base-application/e2e/src/app.e2e-spec.ts | TypeScript |
ArrowFunction |
() => {
page.navigateTo();
expect(page.getParagraphText()).toEqual('Welcome to base-application!');
} | 616799781/aofe.code | chapter10/nginx-microfrontends/base-application/e2e/src/app.e2e-spec.ts | TypeScript |
InterfaceDeclaration |
export interface StatusHistoryData {
items: StatusHistory[];
search_criteria: SearchCriteria;
total_count: number;
} | ns8inc/magento2-rest-client | src/models/StatusHistory.ts | TypeScript |
InterfaceDeclaration |
export interface StatusHistory {
comment: string;
created_at: Date;
entity_id?: number;
entity_name?: string;
extension_attributes?: ParentItemClass;
is_customer_notified?: number;
is_visible_on_front?: number;
parent_id?: number;
status: OrderState | string;
} | ns8inc/magento2-rest-client | src/models/StatusHistory.ts | TypeScript |
ArrowFunction |
dataPoint => dataPoint.timestamp.isSame(today, 'd') | Hub-of-all-Things/Rumpel | src/app/shared/pipes/relative-times-filter.pipe.ts | TypeScript |
ArrowFunction |
dataPoint => dataPoint.timestamp.isSame(yesterday, 'd') | Hub-of-all-Things/Rumpel | src/app/shared/pipes/relative-times-filter.pipe.ts | TypeScript |
ArrowFunction |
dataPoint => dataPoint.timestamp.isAfter(weekAgo) | Hub-of-all-Things/Rumpel | src/app/shared/pipes/relative-times-filter.pipe.ts | TypeScript |
ClassDeclaration |
@Pipe({
name: 'relativeTimesFilter'
})
export class RelativeTimesFilterPipe implements PipeTransform {
transform(timedData: Array<any>, relativeTime: string): any {
let filteredData: Array<any>;
switch (relativeTime) {
case 'today':
const today = moment();
filteredData = timedData.fi... | Hub-of-all-Things/Rumpel | src/app/shared/pipes/relative-times-filter.pipe.ts | TypeScript |
MethodDeclaration |
transform(timedData: Array<any>, relativeTime: string): any {
let filteredData: Array<any>;
switch (relativeTime) {
case 'today':
const today = moment();
filteredData = timedData.filter(dataPoint => dataPoint.timestamp.isSame(today, 'd'));
break;
case 'yesterday':
co... | Hub-of-all-Things/Rumpel | src/app/shared/pipes/relative-times-filter.pipe.ts | TypeScript |
ArrowFunction |
props => props.theme.colors.primary | brenobaptista/blog | src/styles/global.ts | TypeScript |
ArrowFunction |
props =>
props.theme.mode === 'retro' &&
"url('/images/retro/cursor/pointer.cur'), pointer" | brenobaptista/blog | src/styles/global.ts | TypeScript |
ArrowFunction |
props => (props.theme.mode === 'retro' ? '1.05em' : '1.25em') | brenobaptista/blog | src/styles/global.ts | TypeScript |
ArrowFunction |
props => props.theme.colors.text | brenobaptista/blog | src/styles/global.ts | TypeScript |
ArrowFunction |
props => props.theme.colors.background | brenobaptista/blog | src/styles/global.ts | TypeScript |
ArrowFunction |
props =>
props.theme.mode === 'retro' ? 'url(/images/retro/space.gif)' : 'none' | brenobaptista/blog | src/styles/global.ts | TypeScript |
ArrowFunction |
props =>
props.theme.mode === 'retro' &&
"url('/images/retro/cursor/default.cur'), default" | brenobaptista/blog | src/styles/global.ts | TypeScript |
ArrowFunction |
props =>
props.theme.mode === 'retro' &&
`
margin-left: 8px;
letter-spacing: 0.0625rem;
text-shadow:
-1px 1px violet,
-2px 2px indigo,
-3px 3px blue,
-4px 4px green,
-5px 5px yellow,
-6px 6px orange,
-7px 7px red;
` | brenobaptista/blog | src/styles/global.ts | TypeScript |
ArrowFunction |
props =>
props.theme.mode === 'retro' &&
"url('/images/retro/cursor/text.cur'), text" | brenobaptista/blog | src/styles/global.ts | TypeScript |
ArrowFunction |
props => props.theme.colors.altBackground | brenobaptista/blog | src/styles/global.ts | TypeScript |
ArrowFunction |
props => {
const { primary, altBackground } = props.theme.colors
return `${primary} ${altBackground}`
} | brenobaptista/blog | src/styles/global.ts | TypeScript |
ArrowFunction |
({ children }) => {
const SocialMedia = (
<>
<a
className="icon"
href="https://www.linkedin.com/in/christophervachon/"
target="_blank"
title="Checkout my LinkedIn Profile!"
>
<FaLinkedin />
<... | CodeVachon/Site2020 | src/components/Layout.tsx | TypeScript |
ArrowFunction |
() => {
const sameName = loader.projects().filter(project => project.config.name === this.project.name);
let uniqueProjectNamePathSegment: string;
if (sameName.length > 1)
uniqueProjectNamePathSegment = this.project.name + (sameName.indexOf(this._projectImpl) + 1);
else
uniquePr... | Axighi/playwright | packages/playwright-test/src/testInfo.ts | TypeScript |
ArrowFunction |
project => project.config.name === this.project.name | Axighi/playwright | packages/playwright-test/src/testInfo.ts | TypeScript |
ArrowFunction |
() => {
const relativeTestFilePath = path.relative(this.project.testDir, test._requireFile);
return path.join(this.project.snapshotDir, relativeTestFilePath + '-snapshots');
} | Axighi/playwright | packages/playwright-test/src/testInfo.ts | TypeScript |
ClassDeclaration |
class SkipError extends Error {
} | Axighi/playwright | packages/playwright-test/src/testInfo.ts | TypeScript |
MethodDeclaration |
private _modifier(type: 'skip' | 'fail' | 'fixme' | 'slow', modifierArgs: [arg?: any, description?: string]) {
if (typeof modifierArgs[1] === 'function') {
throw new Error([
'It looks like you are calling test.skip() inside the test and pass a callback.',
'Pass a condition instead and optiona... | Axighi/playwright | packages/playwright-test/src/testInfo.ts | TypeScript |
MethodDeclaration |
async _runWithTimeout(cb: () => Promise<any>): Promise<void> {
try {
await this._timeoutRunner.run(cb);
} catch (error) {
if (!(error instanceof TimeoutRunnerError))
throw error;
// Do not overwrite existing failure upon hook/teardown timeout.
if (this.status === 'passed')
... | Axighi/playwright | packages/playwright-test/src/testInfo.ts | TypeScript |
MethodDeclaration |
async _runFn(fn: Function, skips?: 'allowSkips'): Promise<TestError | undefined> {
try {
await fn();
} catch (error) {
if (skips === 'allowSkips' && error instanceof SkipError) {
if (this.status === 'passed')
this.status = 'skipped';
} else {
const serialized = seria... | Axighi/playwright | packages/playwright-test/src/testInfo.ts | TypeScript |
MethodDeclaration |
_addStep(data: Omit<TestStepInternal, 'complete'>) {
return this._addStepImpl(data);
} | Axighi/playwright | packages/playwright-test/src/testInfo.ts | TypeScript |
MethodDeclaration |
_failWithError(error: TestError, isHardError: boolean) {
// Do not overwrite any previous hard errors.
// Some (but not all) scenarios include:
// - expect() that fails after uncaught exception.
// - fail after the timeout, e.g. due to fixture teardown.
if (isHardError && this._hasHardError)
... | Axighi/playwright | packages/playwright-test/src/testInfo.ts | TypeScript |
MethodDeclaration | // ------------ TestInfo methods ------------
async attach(name: string, options: { path?: string, body?: string | Buffer, contentType?: string } = {}) {
if ((options.path !== undefined ? 1 : 0) + (options.body !== undefined ? 1 : 0) !== 1)
throw new Error(`Exactly one of "path" and "body" must be specified`)... | Axighi/playwright | packages/playwright-test/src/testInfo.ts | TypeScript |
MethodDeclaration |
outputPath(...pathSegments: string[]){
fs.mkdirSync(this.outputDir, { recursive: true });
const joinedPath = path.join(...pathSegments);
const outputPath = getContainedPath(this.outputDir, joinedPath);
if (outputPath)
return outputPath;
throw new Error(`The outputPath is not allowed outside o... | Axighi/playwright | packages/playwright-test/src/testInfo.ts | TypeScript |
MethodDeclaration |
snapshotPath(...pathSegments: string[]) {
let suffix = '';
const projectNamePathSegment = sanitizeForFilePath(this.project.name);
if (projectNamePathSegment)
suffix += '-' + projectNamePathSegment;
if (this.snapshotSuffix)
suffix += '-' + this.snapshotSuffix;
const subPath = addSuffixTo... | Axighi/playwright | packages/playwright-test/src/testInfo.ts | TypeScript |
MethodDeclaration |
skip(...args: [arg?: any, description?: string]) {
this._modifier('skip', args);
} | Axighi/playwright | packages/playwright-test/src/testInfo.ts | TypeScript |
MethodDeclaration |
fixme(...args: [arg?: any, description?: string]) {
this._modifier('fixme', args);
} | Axighi/playwright | packages/playwright-test/src/testInfo.ts | TypeScript |
MethodDeclaration |
fail(...args: [arg?: any, description?: string]) {
this._modifier('fail', args);
} | Axighi/playwright | packages/playwright-test/src/testInfo.ts | TypeScript |
MethodDeclaration |
slow(...args: [arg?: any, description?: string]) {
this._modifier('slow', args);
} | Axighi/playwright | packages/playwright-test/src/testInfo.ts | TypeScript |
MethodDeclaration |
setTimeout(timeout: number) {
if (!this.timeout)
return; // Zero timeout means some debug mode - do not set a timeout.
this.timeout = timeout;
this._timeoutRunner.updateTimeout(timeout);
} | Axighi/playwright | packages/playwright-test/src/testInfo.ts | TypeScript |
FunctionDeclaration |
export function abortGameReducer(store: StoreLike, state: State, action: Action): State {
if (state.phase !== GamePhase.FINISHED && action instanceof AbortGameAction) {
const culprit = state.players.find(p => p.id === action.culpritId);
if (culprit === undefined) {
throw new GameError(GameMessage.ILL... | Briojas/NicksPPCC | ptcg-server/src/game/store/reducers/abort-game-reducer.ts | TypeScript |
ArrowFunction |
p => p.id === action.culpritId | Briojas/NicksPPCC | ptcg-server/src/game/store/reducers/abort-game-reducer.ts | TypeScript |
ArrowFunction |
prompt => {
if (prompt.result === undefined) {
prompt.result = null;
}
} | Briojas/NicksPPCC | ptcg-server/src/game/store/reducers/abort-game-reducer.ts | TypeScript |
MethodDeclaration |
async action({ send }) {
const { name, anime, image } = choice(waifus);
await send.embed({
title: name,
description: `anime: ${anime}`,
image: { url: choice(image) },
});
} | Arcasias/Salty-Bot | src/old/commands/image/waifu.ts | TypeScript |
ClassDeclaration |
export class AutoComplete extends React.Component<AutoCompleteProps,any> {} | Amadey666/primereact | src/components/autocomplete/AutoComplete.d.ts | TypeScript |
InterfaceDeclaration |
interface AutoCompleteProps {
id?: string;
value?: any;
name?: string;
type?: string;
suggestions?: any[];
field?: string;
scrollHeight?: string;
dropdown?: boolean;
dropdownMode?: string;
multiple?: boolean;
minLength?: number;
delay?: number;
style?: object;
cl... | Amadey666/primereact | src/components/autocomplete/AutoComplete.d.ts | TypeScript |
ArrowFunction |
async () => {
if (!OCPIService.isConfigAvailable()) {
testData.pending = 1;
}
testData.tenantContext = await ContextProvider.defaultInstance.getTenantContext(ContextDefinition.TENANT_CONTEXTS.TENANT_OCPI);
testData.centralUserContext = testData.tenantContext.getUserContext(ContextDefinition.USER_... | nordicenergy/ev-charging-station-management-backend-server | test/api/OCPIServerTest.ts | TypeScript |
ArrowFunction |
async () => {
} | nordicenergy/ev-charging-station-management-backend-server | test/api/OCPIServerTest.ts | TypeScript |
ArrowFunction |
() => {
let response;
// Check call
it('should access base url: /ocpi/cpo/versions', async () => {
// Create
response = await testData.cpoService.getVersions();
// Check status
expect(response.status).to.be.eql(200);
});
// Check Response Object
it('should have correct... | nordicenergy/ev-charging-station-management-backend-server | test/api/OCPIServerTest.ts | TypeScript |
ArrowFunction |
async () => {
// Create
response = await testData.cpoService.getVersions();
// Check status
expect(response.status).to.be.eql(200);
} | nordicenergy/ev-charging-station-management-backend-server | test/api/OCPIServerTest.ts | TypeScript |
ArrowFunction |
() => {
// Check structure of OCPI Structure
testData.cpoService.checkOCPIResponseStructure(response.data);
} | nordicenergy/ev-charging-station-management-backend-server | test/api/OCPIServerTest.ts | TypeScript |
ArrowFunction |
() => {
expect(response.data).to.not.be.empty;
expect(response.data).to.have.property('status_code', 1000);
expect(response.data).to.have.property('status_message', 'Success');
expect(response.data).to.have.property('data').to.be.an('array').that.is.not.empty;
} | nordicenergy/ev-charging-station-management-backend-server | test/api/OCPIServerTest.ts | TypeScript |
ArrowFunction |
() => {
expect(response.data.data, 'Invalid Version Object').to.satisfy((versions) => {
for (const version of versions) {
return expect(version).to.have.keys('version', 'url');
}
});
} | nordicenergy/ev-charging-station-management-backend-server | test/api/OCPIServerTest.ts | TypeScript |
ArrowFunction |
(versions) => {
for (const version of versions) {
return expect(version).to.have.keys('version', 'url');
}
} | nordicenergy/ev-charging-station-management-backend-server | test/api/OCPIServerTest.ts | TypeScript |
ArrowFunction |
() => {
expect(response.data.data, 'OCPI 2.1.1 Not Available').to.satisfy((versions) => {
let version211exist = false;
for (const version of versions) {
if (version.version === '2.1.1') {
version211exist = true;
}
}
return version211exist;
})... | nordicenergy/ev-charging-station-management-backend-server | test/api/OCPIServerTest.ts | TypeScript |
ArrowFunction |
(versions) => {
let version211exist = false;
for (const version of versions) {
if (version.version === '2.1.1') {
version211exist = true;
}
}
return version211exist;
} | nordicenergy/ev-charging-station-management-backend-server | test/api/OCPIServerTest.ts | TypeScript |
ArrowFunction |
() => {
let response;
// Check call
it('should access base url: /ocpi/emsp/versions', async () => {
// Create
response = await testData.emspService.getVersions();
// Check status
expect(response.status).to.be.eql(200);
});
// Check Response Object
it('should have corre... | nordicenergy/ev-charging-station-management-backend-server | test/api/OCPIServerTest.ts | TypeScript |
ArrowFunction |
async () => {
// Create
response = await testData.emspService.getVersions();
// Check status
expect(response.status).to.be.eql(200);
} | nordicenergy/ev-charging-station-management-backend-server | test/api/OCPIServerTest.ts | TypeScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.