type stringclasses 7
values | content stringlengths 4 9.55k | repo stringlengths 7 96 | path stringlengths 4 178 | language stringclasses 1
value |
|---|---|---|---|---|
ArrowFunction |
() => {
const color = new Color.Color([0.5, 0.5, 0.5, 0.5], 'testFormat', 'testColor');
assert.isTrue(color.hasAlpha(), 'the color should be considered to have an alpha value');
} | song940/devtools-frontend | test/unittests/front_end/common/Color_test.ts | TypeScript |
ArrowFunction |
() => {
const color = new Color.Color([0.5, 0.5, 0.5, 0.5], 'testFormat', 'testColor');
const result = color.detectHEXFormat();
assert.strictEqual(result, 'hexa', 'format was not detected correctly');
} | song940/devtools-frontend | test/unittests/front_end/common/Color_test.ts | TypeScript |
ArrowFunction |
() => {
const color = new Color.Color([0.5, 0.5, 0.5, 1], 'testFormat', 'testColor');
const result = color.detectHEXFormat();
assert.strictEqual(result, 'hex', 'format was not detected correctly');
} | song940/devtools-frontend | test/unittests/front_end/common/Color_test.ts | TypeScript |
ArrowFunction |
() => {
const color = new Color.Color([0.5, 0.5, 0.5, 0.5], 'testFormat', 'testColor');
const result = color.canonicalRGBA();
assert.deepEqual(result, [128, 128, 128, 0.5], 'canonical RGBA was not returned correctly');
} | song940/devtools-frontend | test/unittests/front_end/common/Color_test.ts | TypeScript |
ArrowFunction |
() => {
const color = new Color.Color([1, 0, 0, 1], 'testFormat', 'testColor');
const result = color.nickname();
assert.strictEqual(result, 'red', 'nickname was not returned correctly');
} | song940/devtools-frontend | test/unittests/front_end/common/Color_test.ts | TypeScript |
ArrowFunction |
() => {
const color = new Color.Color([0.5, 0.5, 0.5, 0.5], 'testFormat', 'testColor');
const result = color.nickname();
assert.isNull(result, 'nickname should be returned as Null');
} | song940/devtools-frontend | test/unittests/front_end/common/Color_test.ts | TypeScript |
ArrowFunction |
() => {
const color = new Color.Color([0.5, 0.5, 0.5, 0.5], 'testFormat', 'testColor');
const result = color.toProtocolRGBA();
assert.deepEqual(result, {r: 128, g: 128, b: 128, a: 0.5}, 'conversion to protocol RGBA was not correct');
} | song940/devtools-frontend | test/unittests/front_end/common/Color_test.ts | TypeScript |
ArrowFunction |
() => {
const color = new Color.Color([1, 0, 0, 1], 'testFormat', 'testColor');
const result = color.invert().rgba();
assert.deepEqual(result, [0, 1, 1, 1], 'inversion was not successful');
} | song940/devtools-frontend | test/unittests/front_end/common/Color_test.ts | TypeScript |
ArrowFunction |
() => {
const color = new Color.Color([1, 0, 0, 1], 'testFormat', 'testColor');
const result = color.setAlpha(0.5).rgba();
assert.deepEqual(result, [1, 0, 0, 0.5], 'alpha value was not set correctly');
} | song940/devtools-frontend | test/unittests/front_end/common/Color_test.ts | TypeScript |
ArrowFunction |
() => {
const color = new Color.Color([1, 0, 0, 0.5], 'testFormat', 'testColor');
const otherColor = new Color.Color([0, 0, 1, 0.5], 'testFormat', 'testColor');
const result = color.blendWith(otherColor).rgba();
assert.deepEqual(result, [0.5, 0, 0.5, 0.75], 'color was not blended correctly');
} | song940/devtools-frontend | test/unittests/front_end/common/Color_test.ts | TypeScript |
ArrowFunction |
() => {
const color = new Color.Color([1, 0, 0, 1], 'original', 'testColor');
const result = color.asString();
assert.strictEqual(result, 'testColor', 'color was not converted to a string correctly');
} | song940/devtools-frontend | test/unittests/front_end/common/Color_test.ts | TypeScript |
ArrowFunction |
() => {
const color = new Color.Color([1, 0, 0, 1], 'nickname', 'testColor');
const result = color.asString();
assert.strictEqual(result, 'red', 'color was not converted to a string correctly');
} | song940/devtools-frontend | test/unittests/front_end/common/Color_test.ts | TypeScript |
ArrowFunction |
() => {
const color = new Color.Color([1, 0, 0, 1], 'hex', 'testColor');
const result = color.asString();
assert.strictEqual(result, '#ff0000', 'color was not converted to a string correctly');
} | song940/devtools-frontend | test/unittests/front_end/common/Color_test.ts | TypeScript |
ArrowFunction |
() => {
const color = new Color.Color([1, 0, 0, 1], 'shorthex', 'testColor');
const result = color.asString();
assert.strictEqual(result, '#f00', 'color was not converted to a string correctly');
} | song940/devtools-frontend | test/unittests/front_end/common/Color_test.ts | TypeScript |
ArrowFunction |
() => {
const color = new Color.Color([1, 0, 0, 1], 'hexa', 'testColor');
const result = color.asString();
assert.strictEqual(result, '#ff0000ff', 'color was not converted to a string correctly');
} | song940/devtools-frontend | test/unittests/front_end/common/Color_test.ts | TypeScript |
ArrowFunction |
() => {
const color = new Color.Color([1, 0, 0, 1], 'shorthexa', 'testColor');
const result = color.asString();
assert.strictEqual(result, '#f00f', 'color was not converted to a string correctly');
} | song940/devtools-frontend | test/unittests/front_end/common/Color_test.ts | TypeScript |
ArrowFunction |
() => {
const color = new Color.Color([1, 0, 0, 1], 'rgb', 'testColor');
const result = color.asString();
assert.strictEqual(result, 'rgb(255 0 0)', 'color was not converted to a string correctly');
} | song940/devtools-frontend | test/unittests/front_end/common/Color_test.ts | TypeScript |
ArrowFunction |
() => {
const color = new Color.Color([1, 0, 0, 1], 'rgba', 'testColor');
const result = color.asString();
assert.strictEqual(result, 'rgb(255 0 0 / 1)', 'color was not converted to a string correctly');
} | song940/devtools-frontend | test/unittests/front_end/common/Color_test.ts | TypeScript |
ArrowFunction |
() => {
const color = new Color.Color([1, 0, 0, 1], 'hsl', 'testColor');
const result = color.asString();
assert.strictEqual(result, 'hsl(0 100% 50%)', 'color was not converted to a string correctly');
} | song940/devtools-frontend | test/unittests/front_end/common/Color_test.ts | TypeScript |
ArrowFunction |
() => {
const color = new Color.Color([1, 0, 0, 1], 'hsla', 'testColor');
const result = color.asString();
assert.strictEqual(result, 'hsl(0 100% 50% / 1)', 'color was not converted to a string correctly');
} | song940/devtools-frontend | test/unittests/front_end/common/Color_test.ts | TypeScript |
ArrowFunction |
() => {
const color = new Color.Color([1, 0, 0, 1], 'rgb', 'testColor');
const result = color.asString('nickname');
assert.strictEqual(result, 'red', 'color was not converted to a string correctly');
} | song940/devtools-frontend | test/unittests/front_end/common/Color_test.ts | TypeScript |
ArrowFunction |
() => {
it('able to return the color for an ID if the ID was already set', () => {
const generator = new Color.Generator();
generator.setColorForID('r', 'Red');
assert.strictEqual(generator.colorForID('r'), 'Red', 'color was not retrieved correctly');
});
it('able to return the color for an ID that ... | song940/devtools-frontend | test/unittests/front_end/common/Color_test.ts | TypeScript |
ArrowFunction |
() => {
const generator = new Color.Generator();
generator.setColorForID('r', 'Red');
assert.strictEqual(generator.colorForID('r'), 'Red', 'color was not retrieved correctly');
} | song940/devtools-frontend | test/unittests/front_end/common/Color_test.ts | TypeScript |
ArrowFunction |
() => {
const generator = new Color.Generator();
assert.strictEqual(generator.colorForID('r'), 'hsl(133 67% 80% / 1)', 'color was not generated correctly');
} | song940/devtools-frontend | test/unittests/front_end/common/Color_test.ts | TypeScript |
ClassDeclaration |
@Component({
selector: 'app-menu-panel',
templateUrl: './menu-panel.component.html',
styleUrls: ['./menu-panel.component.scss']
})
export class MenuPanelComponent implements OnInit {
constructor() { }
ngOnInit(): void {
}
public dados = [{ label: 'PO HTML Framework', link: '/MenuPanel', icon: 'po-icon-... | delciney/angular-po-ui | front/src/app/components/menu-panel/menu-panel.component.ts | TypeScript |
ArrowFunction |
<K extends keyof WindowEventMap, T>(
event: K,
listener: (this: Window, ev: WindowEventMap[K]) => T
): void => useEffect(
(): () => void => {
window.addEventListener(event, listener);
return (): void => {
window.removeEventListener(event, listener);
};
},
[]
) | learnify-ca/learnify-hooks | src/useEventListener.ts | TypeScript |
ArrowFunction |
(): () => void => {
window.addEventListener(event, listener);
return (): void => {
window.removeEventListener(event, listener);
};
} | learnify-ca/learnify-hooks | src/useEventListener.ts | TypeScript |
ArrowFunction |
(): void => {
window.removeEventListener(event, listener);
} | learnify-ca/learnify-hooks | src/useEventListener.ts | TypeScript |
TypeAliasDeclaration |
export type DirectoryOptions = {
isDirectoryExplorer: true;
defaultPath?: string;
title?: string;
}; | WitoDelnat/monokle | src/components/atoms/FileExplorer/FileExplorerOptions.ts | TypeScript |
TypeAliasDeclaration |
export type FileOptions = {
isDirectoryExplorer?: false;
allowMultiple?: boolean;
acceptedFileExtensions?: string[];
defaultPath?: string;
title?: string;
action?: 'save' | 'open';
}; | WitoDelnat/monokle | src/components/atoms/FileExplorer/FileExplorerOptions.ts | TypeScript |
TypeAliasDeclaration |
export type FileExplorerOptions = DirectoryOptions | FileOptions; | WitoDelnat/monokle | src/components/atoms/FileExplorer/FileExplorerOptions.ts | TypeScript |
ClassDeclaration |
export class ButtonizeCustomResource extends CfnResource {
constructor(
scope: Construct,
id: string,
{ target, widget, apiKey }: ButtonizeCustomResourceProps
) {
super(scope, id, {
type: 'Custom::Buttonize',
properties: {
ServiceToken:
ButtonizeCustomResourceProvider.getOrCreateProvider(scope... | buttonize/buttonize-cdk | src/ButtonizeCustomResource.ts | TypeScript |
InterfaceDeclaration |
export interface ButtonizeCustomResourceProps {
readonly target: LambdaTarget | CustomTarget
readonly widget: Widget
readonly apiKey?: string
} | buttonize/buttonize-cdk | src/ButtonizeCustomResource.ts | TypeScript |
ArrowFunction |
(data:string) => {
this.connectedClientID = data
} | TJSTONE99/Single-spa-micro-front-end-tracer | Details_App/src/app/components/question/question.component.ts | TypeScript |
ClassDeclaration |
@Component({
selector: 'app-question',
templateUrl: './question.component.html',
styleUrls: ['./question.component.css']
})
export class QuestionComponent implements OnInit, OnDestroy {
constructor(private websocket: WebsocketService, private eventBus: EventbusService) { }
connectedClientID:string
subs... | TJSTONE99/Single-spa-micro-front-end-tracer | Details_App/src/app/components/question/question.component.ts | TypeScript |
MethodDeclaration |
ngOnInit(): void {
this.connectedClientID = ""
this.subscription = this.eventBus.getConnectedClientValue().subscribe((data:string) => {
this.connectedClientID = data
})
} | TJSTONE99/Single-spa-micro-front-end-tracer | Details_App/src/app/components/question/question.component.ts | TypeScript |
MethodDeclaration |
submitSelection(value: string) :void{
this.websocket.sendMessage('_sendMessageToRecipent', {recipentClientID:this.connectedClientID, value:`Connected User Selected : ${value}`})
} | TJSTONE99/Single-spa-micro-front-end-tracer | Details_App/src/app/components/question/question.component.ts | TypeScript |
MethodDeclaration |
ngOnDestroy(): void{
this.subscription.unsubscribe()
} | TJSTONE99/Single-spa-micro-front-end-tracer | Details_App/src/app/components/question/question.component.ts | TypeScript |
ClassDeclaration |
export class Book extends Publication
{
private _isbn: string;
private _titleBook: string;
private _editorial: string;
private _county: string;
private _city: string;
private _bookPDF: File;
private _certificateEditorial: File;
public getIsbn(): string {
return this._isbn;
}
public setIs... | zjimenez110492/Proyecto-Maestria | src/app/models/publications/book.ts | TypeScript |
MethodDeclaration |
public getIsbn(): string {
return this._isbn;
} | zjimenez110492/Proyecto-Maestria | src/app/models/publications/book.ts | TypeScript |
MethodDeclaration |
public setIsbn(value: string) {
this._isbn = value;
} | zjimenez110492/Proyecto-Maestria | src/app/models/publications/book.ts | TypeScript |
MethodDeclaration |
public getTitleBook(): string {
return this._titleBook;
} | zjimenez110492/Proyecto-Maestria | src/app/models/publications/book.ts | TypeScript |
MethodDeclaration |
public setTitleBook(value: string) {
this._titleBook = value;
} | zjimenez110492/Proyecto-Maestria | src/app/models/publications/book.ts | TypeScript |
MethodDeclaration |
public getEditorial(): string {
return this._editorial;
} | zjimenez110492/Proyecto-Maestria | src/app/models/publications/book.ts | TypeScript |
MethodDeclaration |
public setEditorial(value: string) {
this._editorial = value;
} | zjimenez110492/Proyecto-Maestria | src/app/models/publications/book.ts | TypeScript |
MethodDeclaration |
public getCounty(): string {
return this._county;
} | zjimenez110492/Proyecto-Maestria | src/app/models/publications/book.ts | TypeScript |
MethodDeclaration |
public setCounty(value: string) {
this._county = value;
} | zjimenez110492/Proyecto-Maestria | src/app/models/publications/book.ts | TypeScript |
MethodDeclaration |
public getCity(): string {
return this._city;
} | zjimenez110492/Proyecto-Maestria | src/app/models/publications/book.ts | TypeScript |
MethodDeclaration |
public setCity(value: string) {
this._city = value;
} | zjimenez110492/Proyecto-Maestria | src/app/models/publications/book.ts | TypeScript |
MethodDeclaration |
public getBookPDF(): File {
return this._bookPDF;
} | zjimenez110492/Proyecto-Maestria | src/app/models/publications/book.ts | TypeScript |
MethodDeclaration |
public setBookPDF(value: File) {
this._bookPDF = value;
} | zjimenez110492/Proyecto-Maestria | src/app/models/publications/book.ts | TypeScript |
MethodDeclaration |
public getCertificateEditorial(): File {
return this._certificateEditorial;
} | zjimenez110492/Proyecto-Maestria | src/app/models/publications/book.ts | TypeScript |
MethodDeclaration |
public setCertificateEditorial(value: File) {
this._certificateEditorial = value;
} | zjimenez110492/Proyecto-Maestria | src/app/models/publications/book.ts | TypeScript |
TypeAliasDeclaration |
type IStore = {
items: {
id: string
images: string[]
selectedImage: number
}[]
} | Soare-Robert-Daniel/NFT-Generator-PIS | src/store.ts | TypeScript |
ArrowFunction |
({ Component, pageProps }) => {
// Can be set to 'devnet', 'testnet', or 'mainnet-beta'
const network = WalletAdapterNetwork.Devnet;
// You can also provide a custom RPC endpoint
const endpoint = useMemo(() => clusterApiUrl(network), [network]);
// @solana/wallet-adapter-wallets includes all the ... | TP-Lab/wallet-adapter | packages/starter/nextjs-starter/pages/_app.tsx | TypeScript |
ArrowFunction |
() => clusterApiUrl(network) | TP-Lab/wallet-adapter | packages/starter/nextjs-starter/pages/_app.tsx | TypeScript |
ArrowFunction |
() => [
new PhantomWalletAdapter(),
new GlowWalletAdapter(),
new SlopeWalletAdapter(),
new SolflareWalletAdapter({ network }),
new TorusWalletAdapter(),
] | TP-Lab/wallet-adapter | packages/starter/nextjs-starter/pages/_app.tsx | TypeScript |
ArrowFunction |
(state: State) => state.subApp.financialPositions.financialPositions | kleyow/finance-portal-v2-ui | src/App/FinancialPositions/selectors.ts | TypeScript |
ArrowFunction |
(state: State) => state.subApp.financialPositions.financialPositionsError | kleyow/finance-portal-v2-ui | src/App/FinancialPositions/selectors.ts | TypeScript |
ArrowFunction |
(state: State) =>
state.subApp.financialPositions.isFinancialPositionsPending | kleyow/finance-portal-v2-ui | src/App/FinancialPositions/selectors.ts | TypeScript |
ArrowFunction |
(state: State) => state.subApp.financialPositions.selectedFinancialPosition | kleyow/finance-portal-v2-ui | src/App/FinancialPositions/selectors.ts | TypeScript |
ArrowFunction |
(state: State) =>
state.subApp.financialPositions.financialPositionUpdateAmount | kleyow/finance-portal-v2-ui | src/App/FinancialPositions/selectors.ts | TypeScript |
ArrowFunction |
(state: State) =>
state.subApp.financialPositions.isFinancialPositionUpdateSubmitPending | kleyow/finance-portal-v2-ui | src/App/FinancialPositions/selectors.ts | TypeScript |
ArrowFunction |
(state: State) =>
state.subApp.financialPositions.isFinancialPositionUpdateCancelEnabled | kleyow/finance-portal-v2-ui | src/App/FinancialPositions/selectors.ts | TypeScript |
ArrowFunction |
(state: State) =>
state.subApp.financialPositions.selectedFinancialPositionUpdateAction | kleyow/finance-portal-v2-ui | src/App/FinancialPositions/selectors.ts | TypeScript |
ArrowFunction |
(state: State) =>
state.subApp.financialPositions.isShowUpdateFinancialPositionConfirmModal | kleyow/finance-portal-v2-ui | src/App/FinancialPositions/selectors.ts | TypeScript |
ArrowFunction |
(state: State) =>
state.subApp.financialPositions.isUpdateFinancialPositionNDCAfterConfirmModal | kleyow/finance-portal-v2-ui | src/App/FinancialPositions/selectors.ts | TypeScript |
FunctionDeclaration |
export default function semiOmitCssLoader(source: string) {
return source
.replace(/(import\s+['"][^'"]+\.css['"])/g, '// $1')
.replace(/(require\(['"][^'"]+\.css['"]\))/g, '// $1');
} | AhmedSayed77/semi-design | packages/semi-webpack/src/semi-omit-css-loader.ts | TypeScript |
ClassDeclaration |
export class UserOutputDTO{
readonly id: string;
readonly role: string;
readonly login: string;
readonly createdAt: string;
readonly updatedAt: string;
constructor(data) {
this.id = data.id;
this.role = data.role;
this.login = data.login;
this.creat... | MaksKryuk/practice-wiki | src/modules/output-dto/user.output.dto.ts | TypeScript |
ArrowFunction |
() => ({
root: {
overflow: 'initial',
maxWidth: 304,
backgroundColor: 'transparent',
},
title: {
marginBottom: 0,
},
rateValue: {
fontWeight: 'bold',
marginTop: 2,
},
content: {
position: 'relative',
padding: 24,
margin: '-24% 16px 0',
backgroundColor: '#fff',
... | Galaxyjia/mui-treasury | website/src/docs/components/card/review/ReviewCard.tsx | TypeScript |
ArrowFunction |
(props: ShowcaseProps) => (
<Showcase
{...props} | Galaxyjia/mui-treasury | website/src/docs/components/card/review/ReviewCard.tsx | TypeScript |
ArrowFunction |
(timestamps: number[]) =>
timestamps.map((timestamp) => {
return `t${timestamp}:blocks(first: 1, orderBy: timestamp, orderDirection: desc, where: { timestamp_gt: ${timestamp}, timestamp_lt: ${
timestamp + 600
} }) {
number
}`
}) | CryptoR2022/CryptorDEX | src/views/Info/hooks/useBlocksFromTimestamps.ts | TypeScript |
ArrowFunction |
(timestamp) => {
return `t${timestamp}:blocks(first: 1, orderBy: timestamp, orderDirection: desc, where: { timestamp_gt: ${timestamp}, timestamp_lt: ${
timestamp + 600
} }) {
number
}`
} | CryptoR2022/CryptorDEX | src/views/Info/hooks/useBlocksFromTimestamps.ts | TypeScript |
ArrowFunction |
(subqueries: string[]) => {
return gql`query blocks {
${subqueries}
}`
} | CryptoR2022/CryptorDEX | src/views/Info/hooks/useBlocksFromTimestamps.ts | TypeScript |
ArrowFunction |
async (
timestamps: number[],
sortDirection: 'asc' | 'desc' = 'desc',
skipCount = 500,
): Promise<Block[]> => {
if (timestamps?.length === 0) {
return []
}
const fetchedData: any = await multiQuery(
blocksQueryConstructor,
getBlockSubqueries(timestamps),
BLOCKS_CLIENT,
skipCount,
)
... | CryptoR2022/CryptorDEX | src/views/Info/hooks/useBlocksFromTimestamps.ts | TypeScript |
ArrowFunction |
(block) => block.number | CryptoR2022/CryptorDEX | src/views/Info/hooks/useBlocksFromTimestamps.ts | TypeScript |
ArrowFunction |
(
timestamps: number[],
sortDirection: 'asc' | 'desc' = 'desc',
skipCount = 1000,
): {
blocks?: Block[]
error: boolean
} => {
const [blocks, setBlocks] = useState<Block[]>()
const [error, setError] = useState(false)
const timestampsString = JSON.stringify(timestamps)
const blocksString = blocks ? JS... | CryptoR2022/CryptorDEX | src/views/Info/hooks/useBlocksFromTimestamps.ts | TypeScript |
ArrowFunction |
() => {
const fetchData = async () => {
const timestampsArray = JSON.parse(timestampsString)
const result = await getBlocksFromTimestamps(timestampsArray, sortDirection, skipCount)
if (result.length === 0) {
setError(true)
} else {
setBlocks(result)
}
}
const b... | CryptoR2022/CryptorDEX | src/views/Info/hooks/useBlocksFromTimestamps.ts | TypeScript |
ArrowFunction |
async () => {
const timestampsArray = JSON.parse(timestampsString)
const result = await getBlocksFromTimestamps(timestampsArray, sortDirection, skipCount)
if (result.length === 0) {
setError(true)
} else {
setBlocks(result)
}
} | CryptoR2022/CryptorDEX | src/views/Info/hooks/useBlocksFromTimestamps.ts | TypeScript |
ArrowFunction |
(resolve, reject) => {
resolve(true);
} | NunoEdgarGFlowHub/composer | packages/composer-playground/src/app/editor/add-file/add-file.component.spec.ts | TypeScript |
ArrowFunction |
(resolve, reject) => {
resolve(new BusinessNetworkDefinition('org-acme-biznet@0.0.1', 'Acme Business Network'));
} | NunoEdgarGFlowHub/composer | packages/composer-playground/src/app/editor/add-file/add-file.component.spec.ts | TypeScript |
ArrowFunction |
() => {
mockClientService = sinon.createStubInstance(ClientService);
TestBed.configureTestingModule({
declarations: [
FileImporterComponent,
AddFileComponent,
FileDragDropDirective
],
imports: [
FormsM... | NunoEdgarGFlowHub/composer | packages/composer-playground/src/app/editor/add-file/add-file.component.spec.ts | TypeScript |
ArrowFunction |
() => {
it('should change this.expandInput to true', () => {
component.fileDetected();
component.expandInput.should.equal(true);
});
} | NunoEdgarGFlowHub/composer | packages/composer-playground/src/app/editor/add-file/add-file.component.spec.ts | TypeScript |
ArrowFunction |
() => {
component.fileDetected();
component.expandInput.should.equal(true);
} | NunoEdgarGFlowHub/composer | packages/composer-playground/src/app/editor/add-file/add-file.component.spec.ts | TypeScript |
ArrowFunction |
() => {
it('should change this.expectedInput to false', () => {
component.fileLeft();
component.expandInput.should.equal(false);
});
} | NunoEdgarGFlowHub/composer | packages/composer-playground/src/app/editor/add-file/add-file.component.spec.ts | TypeScript |
ArrowFunction |
() => {
component.fileLeft();
component.expandInput.should.equal(false);
} | NunoEdgarGFlowHub/composer | packages/composer-playground/src/app/editor/add-file/add-file.component.spec.ts | TypeScript |
ArrowFunction |
() => {
it('should call this.createModel if model file detected', fakeAsync(() => {
let b = new Blob(['/**CTO File*/'], {type: 'text/plain'});
let file = new File([b], 'newfile.cto');
let createMock = sandbox.stub(component, 'createModel');
let dataBufferMock = ... | NunoEdgarGFlowHub/composer | packages/composer-playground/src/app/editor/add-file/add-file.component.spec.ts | TypeScript |
ArrowFunction |
() => {
let b = new Blob(['/**CTO File*/'], {type: 'text/plain'});
let file = new File([b], 'newfile.cto');
let createMock = sandbox.stub(component, 'createModel');
let dataBufferMock = sandbox.stub(component, 'getDataBuffer')
.returns(Promise.resolve('some ... | NunoEdgarGFlowHub/composer | packages/composer-playground/src/app/editor/add-file/add-file.component.spec.ts | TypeScript |
ArrowFunction |
() => {
let b = new Blob(['/**JS File*/'], {type: 'text/plain'});
let file = new File([b], 'newfile.js');
let createMock = sandbox.stub(component, 'createScript');
let dataBufferMock = sandbox.stub(component, 'getDataBuffer')
.returns(Promise.resolve('some ... | NunoEdgarGFlowHub/composer | packages/composer-playground/src/app/editor/add-file/add-file.component.spec.ts | TypeScript |
ArrowFunction |
() => {
let b = new Blob(['/**ACL File*/'], {type: 'text/plain'});
let file = new File([b], 'newfile.acl');
let createMock = sandbox.stub(component, 'createRules');
let dataBufferMock = sandbox.stub(component, 'getDataBuffer')
.returns(Promise.resolve('some... | NunoEdgarGFlowHub/composer | packages/composer-playground/src/app/editor/add-file/add-file.component.spec.ts | TypeScript |
ArrowFunction |
() => {
let b = new Blob(['/**README File*/'], {type: 'text/plain'});
let file = new File([b], 'README.md');
let createMock = sandbox.stub(component, 'createReadme');
let dataBufferMock = sandbox.stub(component, 'getDataBuffer')
.returns(Promise.resolve('so... | NunoEdgarGFlowHub/composer | packages/composer-playground/src/app/editor/add-file/add-file.component.spec.ts | TypeScript |
ArrowFunction |
() => {
let b = new Blob(['/**QUERY File*/'], {type: 'text/plain'});
let file = new File([b], 'newfile.qry');
let createMock = sandbox.stub(component, 'createQuery');
let dataBufferMock = sandbox.stub(component, 'getDataBuffer')
.returns(Promise.resolve('so... | NunoEdgarGFlowHub/composer | packages/composer-playground/src/app/editor/add-file/add-file.component.spec.ts | TypeScript |
ArrowFunction |
() => {
let b = new Blob(['/**CTO File*/'], {type: 'text/plain'});
let file = new File([b], 'newfile.cto');
let createMock = sandbox.stub(component, 'fileRejected');
let dataBufferMock = sandbox.stub(component, 'getDataBuffer')
.returns(Promise.reject('some... | NunoEdgarGFlowHub/composer | packages/composer-playground/src/app/editor/add-file/add-file.component.spec.ts | TypeScript |
ArrowFunction |
() => {
let b = new Blob(['/**PNG File*/'], {type: 'text/plain'});
let file = new File([b], 'newfile.png');
let createMock = sandbox.stub(component, 'fileRejected');
let dataBufferMock = sandbox.stub(component, 'getDataBuffer')
.returns(Promise.resolve('som... | NunoEdgarGFlowHub/composer | packages/composer-playground/src/app/editor/add-file/add-file.component.spec.ts | TypeScript |
ArrowFunction |
() => {
it('should return an error status', async(() => {
component.fileRejected('long reason to reject file');
component['alertService'].errorStatus$.subscribe(
(message) => {
expect(message).to.be.equal('long reason to reject file');
... | NunoEdgarGFlowHub/composer | packages/composer-playground/src/app/editor/add-file/add-file.component.spec.ts | TypeScript |
ArrowFunction |
() => {
component.fileRejected('long reason to reject file');
component['alertService'].errorStatus$.subscribe(
(message) => {
expect(message).to.be.equal('long reason to reject file');
}
);
} | NunoEdgarGFlowHub/composer | packages/composer-playground/src/app/editor/add-file/add-file.component.spec.ts | TypeScript |
ArrowFunction |
(message) => {
expect(message).to.be.equal('long reason to reject file');
} | NunoEdgarGFlowHub/composer | packages/composer-playground/src/app/editor/add-file/add-file.component.spec.ts | TypeScript |
ArrowFunction |
() => {
it('should create a new script file', async(() => {
let mockScript = sinon.createStubInstance(Script);
mockScript.getIdentifier.returns('newfile.js');
mockClientService.createScriptFile.returns(mockScript);
let b = new Blob(['/**JS File*/'], {type: 'text... | NunoEdgarGFlowHub/composer | packages/composer-playground/src/app/editor/add-file/add-file.component.spec.ts | TypeScript |
ArrowFunction |
() => {
let mockScript = sinon.createStubInstance(Script);
mockScript.getIdentifier.returns('newfile.js');
mockClientService.createScriptFile.returns(mockScript);
let b = new Blob(['/**JS File*/'], {type: 'text/plain'});
let file = new File([b], 'newfile.js'... | NunoEdgarGFlowHub/composer | packages/composer-playground/src/app/editor/add-file/add-file.component.spec.ts | TypeScript |
ArrowFunction |
() => {
let fileName = 'testFileName.js';
component.addScriptFileName = fileName;
let mockScript = sinon.createStubInstance(Script);
mockScript.getIdentifier.returns(fileName);
mockClientService.createScriptFile.returns(mockScript);
let b = new B... | NunoEdgarGFlowHub/composer | packages/composer-playground/src/app/editor/add-file/add-file.component.spec.ts | TypeScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.