Git Product home page Git Product logo

testing-angular-applications / testing-angular-applications Goto Github PK

View Code? Open in Web Editor NEW
102.0 8.0 85.0 854 KB

Project for the Testing Angular Applications book

Home Page: https://testing-angular-applications.github.io

License: Other

TypeScript 79.11% JavaScript 7.51% CSS 1.84% HTML 10.88% Shell 0.40% SCSS 0.25%
angular testing book protractor jasmine karma typescript testing-angular-applications

testing-angular-applications's Issues

failed to compile -windows 10, master branch

Authors:
My environments: windows 10 ; node version v8.9.3; npm version 5.5.1
The code based is master branch.
when I run "ng serve" I got following "webpack: failed to compile"

_C:\openSourceProjects\testing-angular-applications-master\website>ng serve
Your global Angular CLI version (1.7.3) is greater than your local
version (1.6.8). The local Angular CLI version is used.

To disable this warning use "ng set --global warnings.versionMismatch=false".
** NG Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
Date: 2018-04-10T02:18:02.524Z
Hash: e42356846415c640ea4b
Time: 2470ms
chunk {inline} inline.bundle.js (inline) 5.79 kB [entry] [rendered]
chunk {main} main.bundle.js (main) 2.94 kB [initial] [rendered]
chunk {polyfills} polyfills.bundle.js (polyfills) 636 bytes [initial] [rendered]
chunk {styles} styles.bundle.js (styles) 41.5 kB [initial] [rendered]
chunk {vendor} vendor.bundle.js (vendor) 855 kB [initial] [rendered]

ERROR in ./node_modules/css-loader?{"sourceMap":false,"import":false}!./node_modules/postcss-loader/lib?{"ident":"postcss","sourceMap":false}!./node_modules/sass-loader/lib/loader.js?{"sourceMap":false,"precision":8,"includePaths":[]}!./src/material-app-theme.scss
Module build failed: Error: Cannot find module 'node-sass'
at Function.Module._resolveFilename (module.js:536:15)
at Function.Module._load (module.js:466:25)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at Object. (C:\openSourceProjects\testing-angular-applications-master\website\node_modules\sass-loader\lib\loader.js:3:14)
at Module._compile (module.js:635:30)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at loadLoader (C:\openSourceProjects\testing-angular-applications-master\website\node_modules\loader-runner\lib\loadLoader.js:13:17)
at iteratePitchingLoaders (C:\openSourceProjects\testing-angular-applications-master\website\node_modules\loader-runner\lib\LoaderRunner.js:169:2)
at iteratePitchingLoaders (C:\openSourceProjects\testing-angular-applications-master\website\node_modules\loader-runner\lib\LoaderRunner.js:165:10)
at C:\openSourceProjects\testing-angular-applications-master\website\node_modules\loader-runner\lib\LoaderRunner.js:173:18
@ ./src/material-app-theme.scss 4:14-203
@ multi ./src/styles.css ./src/material-app-theme.scss
ERROR in Error: No NgModule metadata found for 'AppModule'.
at NgModuleResolver.resolve (C:\openSourceProjects\testing-angular-applications-master\website\node_modules@angular\compiler\bundles\compiler.umd.js:20247:23)
at CompileMetadataResolver.getNgModuleMetadata (C:\openSourceProjects\testing-angular-applications-master\website\node_modules@angular\compiler\bundles\compiler.umd.js:15216:60)
at visitLazyRoute (C:\openSourceProjects\testing-angular-applications-master\website\node_modules@angular\compiler\bundles\compiler.umd.js:31061:104)
at AotCompiler.listLazyRoutes (C:\openSourceProjects\testing-angular-applications-master\website\node_modules@angular\compiler\bundles\compiler.umd.js:31029:20)
at AngularCompilerProgram.listLazyRoutes (C:\openSourceProjects\testing-angular-applications-master\website\node_modules@angular\compiler-cli\src\transformers\program.js:156:30)
at Function.NgTools_InternalApi_NG_2.listLazyRoutes (C:\openSourceProjects\testing-angular-applications-master\website\node_modules@angular\compiler-cli\src\ngtools_api.js:44:36)
at AngularCompilerPlugin._getLazyRoutesFromNgtools (C:\openSourceProjects\testing-angular-applications-master\website\node_modules@angular\cli\node_modules@ngtools\webpack\src\angular_compiler_plugin.js:249:66)
at Promise.resolve.then.then (C:\openSourceProjects\testing-angular-applications-master\website\node_modules@angular\cli\node_modules@ngtools\webpack\src\angular_compiler_plugin.js:572:50)
at
at process._tickCallback (internal/process/next_tick.js:188:7)

webpack: Failed to compile._

Outdated dependencies

Hi, it seems like the dependencies are outdated. I tried running npm i but I keep having issues with node-gyp. I received error messages saying that node-gyp has a bug and should be updated. But doing so doesn't fix the issue and errors keep showing up. Could you please look into the issue or update the repo? For now, it's impossible for me to use the sourcecode, which makes it really hard to follow along with the book.

Condense all projects to a single repository

Stage all changes to a migration branch

  • Move contacts app starter to a website/ folder
  • Rebase this repository with chapter repositories to maintain git history. Should maintain any circle ci or travis tests and roll them into the same test
  • Change the repository name to test-angular-applications
  • Rebase experiment branch?

failed on run unit test against contact-edit.component.spec.ts in windows 10, master branch

Authors:

My environments: windows 10 ; node version v8.9.3; npm version 5.5.1
The code based is master branch. After copying and pasting contact-edit-component.spec.ts from chapter03 folder to website/src/app/contacts/contact-edit

when I run "ng test" I got following errors

C:\openSourceProjects\testing-angular-applications-master\website>ng test
Your global Angular CLI version (1.7.3) is greater than your local
version (1.6.8). The local Angular CLI version is used.

To disable this warning use "ng set --global warnings.versionMismatch=false".
10% building modules 1/1 modules 0 active09 04 2018 19:28:54.041:WARN [karma]: No captured browser, open http://localhost:9876/
09 04 2018 19:28:54.072:INFO [karma]: Karma v1.7.1 server started at http://0.0.0.0:9876/
09 04 2018 19:28:54.075:INFO [launcher]: Launching browser Chrome with unlimited concurrency
09 04 2018 19:28:54.092:INFO [launcher]: Starting browser Chrome [../../../../../src recursive .spec.ts$] ./src .spec.ts$ 261 bytes {main} [built]
[../../../../../src/polyfills.ts] ./src/polyfills.ts 2.6 kB {polyfills} [built]
[../../../../../src/test.ts] ./src/test.ts 1.01 kB {main} [built]
[../../../../zone.js/dist/async-test.js] ./node_modules/zone.js/dist/async-test.js 3.23 kB {vendor} [built]
[../../../../zone.js/dist/fake-async-test.js] ./node_modules/zone.js/dist/fake-async-test.js 17 kB {vendor} [built]
[../../../../zone.js/dist/jasmine-patch.js] ./node_modules/zone.js/dist/jasmine-patch.js 6.36 kB {vendor} [built]
[../../../../zone.js/dist/long-stack-trace-zone.js] ./node_modules/zone.js/dist/long-stack-trace-zone.js 6.22 kB {vendor} [built]
[../../../../zone.js/dist/proxy.js] ./node_modules/zone.js/dist/proxy.js 5.6 kB {vendor} [built]
[../../../../zone.js/dist/sync-test.js] ./node_modules/zone.js/dist/sync-test.js 1.41 kB {vendor} [built]
[../../../../zone.js/dist/zone.js] ./node_modules/zone.js/dist/zone.js 126 kB {polyfills} [built]
[../../../compiler/esm5/compiler.js] ./node_modules/@angular/compiler/esm5/compiler.js 1.2 MB {vendor} [built]
[0] multi ./src/polyfills.ts 28 bytes {polyfills} [built]
[../../../core/esm5/testing.js] ./node_modules/@angular/core/esm5/testing.js 49.9 kB {vendor} [built]
[../../../platform-browser-dynamic/esm5/platform-browser-dynamic.js] ./node_modules/@angular/platform-browser-dynamic/esm5/platform-browser-dynamic.js 24.9 kB {vendor} [built]
[../../../platform-browser-dynamic/esm5/testing.js] ./node_modules/@angular/platform-browser-dynamic/esm5/testing.js 17.9 kB {vendor} [built]
+ 282 hidden modules

ERROR in ./node_modules/css-loader?{"sourceMap":false,"import":false}!./node_modules/postcss-loader/lib?{"ident":"postcss","sourceMap":false}!./node_modules/sass-loader/lib/loader.js?{"sourceMap":false,"precision":8,"includePaths":[]}!./src/material-app-theme.scss
Module build failed: Error: Cannot find module 'node-sass'
at Function.Module._resolveFilename (module.js:536:15)
at Function.Module._load (module.js:466:25)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at Object. (C:\openSourceProjects\testing-angular-applications-master\website\node_modules\sass-loader\lib\loader.js:3:14)
at Module._compile (module.js:635:30)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at loadLoader (C:\openSourceProjects\testing-angular-applications-master\website\node_modules\loader-runner\lib\loadLoader.js:13:17)
at iteratePitchingLoaders (C:\openSourceProjects\testing-angular-applications-master\website\node_modules\loader-runner\lib\LoaderRunner.js:169:2)
at iteratePitchingLoaders (C:\openSourceProjects\testing-angular-applications-master\website\node_modules\loader-runner\lib\LoaderRunner.js:165:10)
at C:\openSourceProjects\testing-angular-applications-master\website\node_modules\loader-runner\lib\LoaderRunner.js:173:18
@ ./src/material-app-theme.scss 4:14-203
@ ./src/app/contacts/contact-edit/contacts-edit.component.spec.ts
@ ./src .spec.ts$
@ ./src/test.ts
09 04 2018 19:29:54.095:WARN [launcher]: Chrome have not captured in 60000 ms, killing.

warnings at windows 10 platform run "npm install"

Authors:
My environments: windows 10 ; node version v8.9.3; npm version 5.5.1
The code based is master branch.
when I run "npm install" I got following warning.
C:\openSourceProjects\testing-angular-applications-master\website>npm install
npm WARN [email protected] requires a peer of ajv@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of node-sass@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

added 115 packages in 20.285s

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.