This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as React from 'react'; | |
import * as sinon from 'Sinon'; | |
import { expect, assert } from 'chai'; | |
import { mount, render, shallow } from 'enzyme'; | |
import { ModalComponent } from './path/of/my/modal/component'; | |
import * as Button from 'react-bootstrap/lib/Button'; | |
import * as ModalFooter from 'react-bootstrap/lib/ModalFooter'; | |
import * as ModalBody from 'react-bootstrap/lib/ModalBody'; | |
import * as Modal from 'react-bootstrap/lib/Modal'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { IState } from './types'; | |
import { MyReducer } from './path/to/my/reducer'; | |
import { expect, assert } from 'chai'; | |
describe("DashBoardTodoListStateReducer", () => | |
{ | |
var defaultState:IState | |
beforeEach(() => { | |
defaultState = MyReducer(undefined, undefined); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as React from 'react'; | |
import { expect, assert } from 'chai'; | |
import { mount, render, shallow } from 'enzyme'; | |
import * as sinon from 'Sinon'; | |
import { AttendanceActionCreators } from './path/to/actions'; | |
import { AttendanceReducer } from './path/to/reducer'; | |
import { IAttendState } from './path/to/types'; | |
import { Service } from './path/to/service'; | |
describe('Action Test', () => |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"RI":{ | |
"prefix":"ri", | |
"body":["import * as React from 'react';",""], | |
"description":"import * as React from 'react';" | |
}, | |
"RC": { | |
"prefix": "rc", | |
"body": ["export interface I${Component}State { }", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
ReactiveFormsModule, | |
NG_VALIDATORS, | |
FormsModule, | |
FormGroup, | |
FormControl, | |
ValidatorFn, | |
Validator | |
} from '@angular/forms'; | |
import { Directive } from '@angular/core'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is only a code snippet and should only provide a guide of testing scenarios. | |
describe('rmaLeasingLocationAwards', () => { | |
let $q; | |
let $componentController; | |
let $rootScope; | |
let controller; | |
beforeEach(() => { | |
angular.mock.module('RateMyAgent.Profiles.Locations.Leasing'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { ContactBarController } from './contactBar.controller'; | |
angular.module('RateMyAgent.Common').component('rmaContactBar', { | |
templateUrl: '/templates/_common/contact-bar/contactBar.html', | |
bindings: { | |
agent: '<', | |
buttonLocation: '<' | |
}, | |
controllerAs: '$ctrl', | |
controller: ContactBarController |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// match regex yes | |
rl.question('Are you sure you want to download reference pictures? (y(es))', async (answer) => { | |
if (answer.match(/^y(es)?$/i)) { | |
await downloadNewRefPics(newRefPicsList); | |
} | |
rl.close(); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { throwError as observableThrowError, from as observableFrom, Observable, TimeoutError, of } from 'rxjs'; | |
import { mergeMap, catchError, timeout, retryWhen, concatMap } from 'rxjs/operators'; | |
import { Injectable } from '@angular/core'; | |
import { HttpClient, HttpParams } from '@angular/common/http'; | |
import { EntityService } from '../entity/entity.service'; | |
import { UserService } from '../../promoter/legacy/_common/services/user-service/user.service'; | |
import rmaProperties from '../../../rmaProperties'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as React from 'react' | |
import * as Redux from 'redux' | |
import { MyReduxState } from './my-root-reducer.ts' | |
export interface OwnProps { | |
propFromParent: number | |
} | |
interface StateProps { |
OlderNewer