业力运行单项测试 [英] Karma run single test

查看:90
本文介绍了业力运行单项测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用业力进行运行测试.我有很多测试,并且运行所有测试的过程非常缓慢.我只想运行一次测试,以节省时间,因为所有测试都运行约10分钟.

I use karma for run tests. I have many tests and run all tests is very slow process. I want to run only single test in order to spend less time, because all test runs about 10 minutes.

有可能吗?

谢谢.

推荐答案

如果使用的是 Karma/Jasmine 堆栈,请使用:

If you are using the Karma/Jasmine stack, use:

fdescribe("when ...", function () { // to [f]ocus on a single group of tests
  fit("should ...", function () {...}); // to [f]ocus on a single test case
});

...和:

xdescribe("when ...", function () { // to e[x]clude a group of tests
  xit("should ...", function () {...}); // to e[x]clude a test case
});

当您使用业力/摩卡咖啡时:

describe.only("when ...", function () { // to run [only] this group of tests
  it.only("should ...", function () {...}); // to run [only] this test case
});

...和:

describe.skip("when ...", function () { // to [skip] running this group of tests
  it.skip("should ...", function () {...}); // to [skip] running this test case
});

这篇关于业力运行单项测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆