dart-unittest

    2热度

    1回答

    我正在尝试为海盗徽章教程编写一个测试,旨在让人们开始使用Dart。 我有以下目录结构: 在6 piratebadge的代码是什么来在本教程的不变版本。 我添加的是测试包。 测试/ test.html中包含: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> </head> <body> <script type="ap

    2热度

    1回答

    有像 @Component( selector: 'my-test', template: 'none', changeDetection: ChangeDetectionStrategy.OnPush, ) class MyTestComponent { final AngularClientCache clientCache; MyTestC

    2热度

    2回答

    我想测试一个调用exit的函数。 基本上,我有一个控制台应用程序,询问用户他是否确定他想要覆盖目录。当用户回答“否”时,目录不会被覆盖,程序应该退出。 promptToDeleteRepo() { bool okToDelete = ... if(okToDelete) { deleteRepo(); } else { exit(0);

    1热度

    1回答

    我希望能够对我的定制聚合物元素进行单元测试。 给定一个部件在LIB/web_components: class Foo extends PolymerElement { Foo.created() : super.created(); } 和在测试/ web_components测试: main() { test("Should Be a PolymerElement",

    3热度

    2回答

    浏览器测试需要从命令行运行,如pub run test -pdartium。有没有办法来调试这样的测试。

    0热度

    1回答

    我正在通过AngularDart教程工作,并在完成练习时尝试编写单元测试。 我有一个测试,看起来像这样: test('should convert sugar ingredient to maple syrup', inject((SugarFilter filter) { var r1 = new Recipe(null, null, null, ['has sugar in ingr

    0热度

    1回答

    我目前有两组测试,除了setUp()方法调用之外,其他各种测试方法都是相同的。我想简化代码,以便一组测试仅定义一次,但每个组都运行自己的方法,然后运行相同的一组测试。 目前我的代码看起来是这样的: group('test things while a flag is turned off',() { setUp(() { global_flags.flag = false;

    1热度

    1回答

    我想为我的课写一个unittest。首先,我安装package unittest并创建一个spec文件夹来保存我所有的unittest文件。然后,我创建了一个测试镖文件,内容如下: library i18n_test; import 'package:unittest/unittest.dart'; void main() { } 当我运行该文件,我得到了以下错误 Unable

    2热度

    2回答

    所有, 下面是检查 main() { test("Resource Manager Image Load",() { ResourceManager rm = new ResourceManager(); int WRONG_SIZE = 1000000; rm.loadImageManifest("data/rm/test_images.yaml").t

    4热度

    1回答

    我正在运行使用test库的dart测试。 pub run test -p dartium 当执行此命令时,我得到下面的错误,我有dartium和dart sdk下载并在系统路径中。 Failed to start Dartium: No such file or directory Command: dartium --user-data-dir=/tmp/dart_test_cwD