这是indexloc提供的服务,不要输入任何密码
Skip to content

dartfn-generated project fails tests locally #295

@redbrogdon

Description

@redbrogdon

I just tried creating a project with dartfn, and I can't get the generated code to pass its included tests:

~/source/hellow> dartfn generate helloworld
project: hellow
Creating helloworld application `hellow`:
  /Users/redbrogdon/source/hellow/.gitignore
  /Users/redbrogdon/source/hellow/Dockerfile
  /Users/redbrogdon/source/hellow/Makefile
  /Users/redbrogdon/source/hellow/README.md
  /Users/redbrogdon/source/hellow/analysis_options.yaml
  /Users/redbrogdon/source/hellow/bin/server.dart
  /Users/redbrogdon/source/hellow/lib/functions.dart
  /Users/redbrogdon/source/hellow/pubspec.yaml
  /Users/redbrogdon/source/hellow/test/function_test.dart
9 files written.

--> to provision required packages, run 'pub get'

~/source/hellow> dart pub get
Resolving dependencies... (1.3s)
+ _fe_analyzer_shared 29.0.0
+ analyzer 2.6.0
+ args 2.3.0
+ async 2.8.2
+ boolean_selector 2.1.0
+ build 2.1.1
+ build_config 1.0.0
+ build_daemon 3.0.1
+ build_resolvers 2.0.4
+ build_runner 2.1.4
+ build_runner_core 7.2.2
+ built_collection 5.1.1
+ built_value 8.1.2
+ charcode 1.3.1
+ checked_yaml 2.0.1
+ cli_util 0.3.5
+ code_builder 4.1.0
+ collection 1.15.0
+ convert 3.0.1
+ coverage 1.0.3
+ crypto 3.0.1
+ dart_style 2.2.0
+ file 6.1.2
+ fixnum 1.0.0
+ frontend_server_client 2.1.2
+ functions_framework 0.4.1
+ functions_framework_builder 0.4.4
+ glob 2.0.2
+ graphs 2.1.0
+ http 0.13.4
+ http_multi_server 3.0.1
+ http_parser 4.0.0
+ io 1.0.3
+ js 0.6.3
+ json_annotation 4.3.0
+ logging 1.0.2
+ matcher 0.12.11
+ meta 1.7.0
+ mime 1.0.0
+ node_preamble 2.0.1
+ package_config 2.0.2
+ path 1.8.0
+ pool 1.5.0
+ pub_semver 2.1.0
+ pubspec_parse 1.1.0
+ shelf 1.2.0
+ shelf_packages_handler 3.0.0
+ shelf_static 1.1.0
+ shelf_web_socket 1.0.1
+ source_gen 1.1.1
+ source_helper 1.3.0
+ source_map_stack_trace 2.1.0
+ source_maps 0.10.10
+ source_span 1.8.1
+ stack_trace 1.10.0
+ stream_channel 2.1.0
+ stream_transform 2.0.0
+ string_scanner 1.1.0
+ term_glyph 1.2.0
+ test 1.18.2
+ test_api 0.4.5
+ test_core 0.4.5
+ test_process 2.0.2
+ timing 1.0.0
+ typed_data 1.3.0
+ vm_service 7.3.0
+ watcher 1.0.1
+ web_socket_channel 2.1.0
+ webkit_inspection_protocol 1.0.0
+ yaml 3.1.0
Changed 70 dependencies!

~/source/hellow> dart test --chain-stack-traces
Building package executable... (5.1s)
Built test:test.
00:02 +0 -1: test/function_test.dart: defaults [E]
  Expected: <0>
    Actual: <-15>
  Process `dart bin/server.dart` had an unexpected exit code.

  package:test_api                              expect
  package:test_process/test_process.dart 228:5  TestProcess.shouldExit


Process `dart bin/server.dart` exited with exitCode -15. Output:
    Listening on :8080
    2021-10-16T15:58:22.530506  0:00:00.005658 GET     [200] /
00:02 +0 -1: Some tests failed.

Any idea what might be going wrong for me? Have I missed a step somewhere?

My Dart version is:

Dart SDK version: 2.14.4 (stable) (Wed Oct 13 11:11:32 2021 +0200) on "macos_x64"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions