本文整理汇总了TypeScript中ava.skip函数的典型用法代码示例。如果您正苦于以下问题:TypeScript skip函数的具体用法?TypeScript skip怎么用?TypeScript skip使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了skip函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1: test
});
test('throws on invalid redirect URL', withServer, async (t, server, got) => {
server.get('/', (_request, response) => {
response.writeHead(302, {
location: 'http://'
});
response.end();
});
await t.throwsAsync(got(''), {
code: 'ERR_INVALID_URL'
});
});
// TODO: Enable this again when https://github.com/nock/nock/issues/1509 is fixed
// eslint-disable-next-line ava/no-skip-test
test.skip('port is reset on redirect', withServer, async (t, server, got) => {
server.get('/', (_request, response) => {
response.writeHead(307, {
location: 'http://localhost'
});
response.end();
});
nock('http://localhost').get('/').reply(200, 'ok');
const {body} = await got('');
t.is(body, 'ok');
});
开发者ID:sindresorhus,项目名称:got,代码行数:30,代码来源:redirects.ts
示例2: constructor
export class AppComponent {
public constructor(protected _translateService: TranslateService) { }
public test() {
this._translateService.translate('Hello World');
}
`;
const keys = parser.extract(contents, componentFilename).keys();
t.deepEqual(keys, ['Hello World']);
});
test.skip('should extract array of strings in TranslateService\'s translate() method', async t => {
const contents = `
@Component({ })
export class AppComponent {
public constructor(protected _translateService: TranslateService) { }
public test() {
this._translateService.translate(['Hello', 'World']);
}
`;
const keys = parser.extract(contents, componentFilename).keys();
t.deepEqual(keys, ['Hello', 'World']);
});
test('should extract strings with liberal spacing', async t => {
const contents = `
@Component({ })
export class AppComponent {
public constructor(
protected _translateService: TranslateService,
protected _otherService: OtherService
) { }
public test() {
开发者ID:bvkimball,项目名称:linguist,代码行数:32,代码来源:ServiceParser.spec.ts
示例3: test
test('should only extract string using pipe', async t => {
const contents = `<button [style.background]="'lime'">{{ 'SomeKey_NotWorking' | translate }}</button>`;
const keys = parser.extract(contents, templateFilename).keys();
t.deepEqual(keys, ['SomeKey_NotWorking']);
});
test('should extract interpolated strings using translate pipe', async t => {
const contents = `Hello {{ 'World' | translate }}`;
const keys = parser.extract(contents, templateFilename).keys();
t.deepEqual(keys, ['World']);
});
test.skip('should extract strings with escaped quotes', async t => {
const contents = `Hello {{ 'World\'s largest potato' | translate }}`;
const keys = parser.extract(contents, templateFilename).keys();
t.deepEqual(keys, [`World's largest potato`]);
});
test('should extract interpolated strings using translate pipe in attributes', async t => {
const contents = `<span attr="{{ 'Hello World' | translate }}"></span>`;
const keys = parser.extract(contents, templateFilename).keys();
t.deepEqual(keys, ['Hello World']);
});
test('should extract bound strings using translate pipe in attributes', async t => {
const contents = `<span [attr]="'Hello World' | translate"></span>`;
const keys = parser.extract(contents, templateFilename).keys();
t.deepEqual(keys, ['Hello World']);
});
开发者ID:bvkimball,项目名称:linguist,代码行数:29,代码来源:PipeParser.spec.ts
示例4: test
test('should display warning messages', async t => {
Logger.warn('Warning!!!');
t.pass();
});
test('should display success messages', async t => {
Logger.success('You did it!');
t.pass();
});
test('should display log error messages', async t => {
Logger.error('Error...');
t.pass();
});
test('should display spinner', async t => {
Logger.spin('processing...');
t.pass();
});
test('should display log error messages', async t => {
Logger.stop();
t.pass();
});
test.skip('should clear messages', async t => {
Logger.clear();
t.pass();
});
开发者ID:bvkimball,项目名称:linguist,代码行数:29,代码来源:LumberJack.spec.ts
示例5: Translations
});
});
let XML: string = `<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
<file source-language="en-US" target-language="en-US" datatype="plaintext" original="messages" product-name="@bullhorn/linguist">
<body>
<trans-unit id="FIRST_KEY" datatype="html">
<source>One</source>
<target/>
</trans-unit>
<trans-unit id="SECOND_KEY" datatype="html">
<source>Two</source>
<target/>
</trans-unit>
</body>
</file>
</xliff>`;
let KEYS: any = {'FIRST_KEY': 'One', 'SECOND_KEY': 'Two' };
test.skip('should convert to json keys on parse', async t => {
const collection: Translations = compiler.parse(XML);
t.deepEqual(collection.values, KEYS);
});
test('should convert to xliff xml on compile', async t => {
const collection = new Translations(KEYS);
const result: string = compiler.compile(collection);
t.deepEqual(result, XML);
});
开发者ID:bvkimball,项目名称:linguist,代码行数:30,代码来源:XliffCompiler.spec.ts
示例6:
import test from 'ava';
import got from '../source';
// TODO: Use `getActiveResources()` instead of `process.binding('timer_wrap')` when it's out:
// https://github.com/nodejs/node/pull/21453
// eslint-disable-next-line ava/no-skip-test
test.skip('clear the progressInterval if the socket has been destroyed', async t => {
// @ts-ignore
const {Timer} = process.binding('timer_wrap'); // eslint-disable-line node/no-deprecated-api
await t.throwsAsync(got('http://127.0.0.1:55555', {retry: 0}), {
code: 'ECONNREFUSED'
});
// @ts-ignore
const progressIntervalTimer = process._getActiveHandles().filter(handle => {
// Check if the handle is a Timer that matches the `uploadEventFrequency` interval
return handle instanceof Timer && handle._list.msecs === 150;
});
t.is(progressIntervalTimer.length, 0);
});
开发者ID:sindresorhus,项目名称:got,代码行数:21,代码来源:socket-destroyed.ts
示例7: Error
// throw new Error('should not run before')
// })
ava.beforeEach(() => {
throw new Error('should not run beforeEach')
})
// ava.after(() => {
// throw new Error('should not run after')
// })
ava.afterEach(() => {
throw new Error('should not run after each')
})
ava.skip('skip test', _t => {
throw new Error('should not run ava skip')
})
ftest.skip('case-1', _t => {
throw new Error('should not run ftest.skip')
})
ftest.skip.each(_t => {
throw new Error('should not run')
})
ftest.skip.each.failing(_t => {
throw new Error('should not run')
})
开发者ID:unional,项目名称:ava-fixture,代码行数:30,代码来源:fixture.skip.spec.ts
注:本文中的ava.skip函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论