tns test fails with error "ReferenceError: Can't find variable: Zone"
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 25/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- angular, javascript
調査の方向性
まず、CLI、モジュール、ランタイムについて記載されているバージョンを使って、報告された tns のテスト失敗を再現します。error.service.test.ts と error.service.ts を読み、beforeEach() 内の Angular のテスト用インジェクションに注目します。iOS と Android の両方で、Zone に関する ReferenceError が発生せずにサービスのテストが実行されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Tell us about the problem
Please, ensure your title is less than 63 characters long and starts with a capital
letter.
Which platform(s) does your issue occur on?
iOS, Android
Please provide the following version numbers that your issue occurs with:
-
CLI: (run
tns --versionto fetch it)
3.4.0 -
Cross-platform modules: (check the 'version' attribute in the
node_modules/tns-core-modules/package.jsonfile in your project)
3.3.0 -
Runtime(s): (look for the
"tns-android"and"tns-ios"properties in the
package.jsonfile of your project)
3.0.0
Please tell us how to recreate the issue in as much detail as possible.
- Build a service that requires injection of TranslateService (from ng-translate)
- Inject that service in beforeEach() of a test suite.
Is there code involved? If so, please share the minimal amount of code needed to recreate the problem.
error.service.test.ts
'use strict';
import {ErrorService} from '../services/error.service';
import {inject} from "@angular/core/testing";
declare let assert: Chai.AssertStatic;
describe("ErrorService tests", () => {
let service = null;
beforeEach((done) => {
inject([ErrorService], (injectService: ErrorService) => {
service = injectService;
done();
});
});
it("Service exists", (done) => {
assert.exists(service);
done();
});
});
error.service.ts
import { Injectable } from "@angular/core";
import { TranslateService } from "ng2-translate";
@Injectable()
export class ErrorService {
constructor(private i18n: TranslateService) {
}
}
- 主要言語
- JavaScript
- スター
- 1.1k
- フォーク
- 204
- 平均マージ
- 1日 9時間
- マージ済み PR(30日)
- 8
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
NativeScript/nativescript-cli のほかの issue
-
in-progress
NativeScript/nativescript-cli#6140 · コメント 2 件 · 担当者 1 名 ·
-
NativeScript/nativescript-cli#6090 · 担当者 1 名 ·
-
in progress
NativeScript/nativescript-cli#6015 · リアクション 1 件 · 担当者 1 名 ·
-
question
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
NativeScript/nativescript-cli#5992 · コメント 5 件 ·
-
feature-pending-triage
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
NativeScript/nativescript-cli#5975 ·
NativeScript/nativescript-cli の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
avniproject/avni-client#2135 ·
-
automated broken-link
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
-
agent/security hive/hosted-available-lke648397-260827-5n31 security
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
babalae/bettergi-scripts-list#3674 ·
-
A-Release-Notes C-Editing D-Modest S-Ready-For-Implementation
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
bevyengine/bevy-website#2595 ·