<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>tdd | Bogdan's blog</title>
	<atom:link href="https://blog.bogdancarpean.com/tag/tdd/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.bogdancarpean.com</link>
	<description>Code and anything else.</description>
	<lastBuildDate>Wed, 09 Aug 2017 16:14:39 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.1.1</generator>

<image>
	<url>https://blog.bogdancarpean.com/wp-content/uploads/2022/12/icons8-pencil-drawing-96.png</url>
	<title>tdd | Bogdan's blog</title>
	<link>https://blog.bogdancarpean.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Angular Jasmine Karma test when component has own module</title>
		<link>https://blog.bogdancarpean.com/angular-jasmine-karma-test-when-component-has-own-module/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=angular-jasmine-karma-test-when-component-has-own-module</link>
					<comments>https://blog.bogdancarpean.com/angular-jasmine-karma-test-when-component-has-own-module/#respond</comments>
		
		<dc:creator><![CDATA[Bogdan]]></dc:creator>
		<pubDate>Wed, 09 Aug 2017 16:14:39 +0000</pubDate>
				<category><![CDATA[Angular 2]]></category>
		<category><![CDATA[angular]]></category>
		<category><![CDATA[jasmine]]></category>
		<category><![CDATA[Karma]]></category>
		<category><![CDATA[tdd]]></category>
		<category><![CDATA[tests]]></category>
		<guid isPermaLink="false">http://blog.bogdancarpean.com/?p=91</guid>

					<description><![CDATA[<p>Always remember that your TestBed.configureTestingModule() is there on your test to recreate your module the same way is created on the app. Let&#8217;s assume that you have a structure like following: &#160; - your.component   - your-child1.component   - your.child2.component -your.pipe -your.module In your.module you will import and declare all your three components and the [&#8230;]</p>
The post <a href="https://blog.bogdancarpean.com/angular-jasmine-karma-test-when-component-has-own-module/">Angular Jasmine Karma test when component has own module</a> first appeared on <a href="https://blog.bogdancarpean.com">Bogdan's blog</a>.]]></description>
										<content:encoded><![CDATA[<p>Always remember that your TestBed.configureTestingModule() is there on your test to recreate your module the same way is created on the app.</p>
<p>Let&#8217;s assume that you have a structure like following:</p>
<p>&nbsp;</p>
<pre class="EnlighterJSRAW" data-enlighter-language="generic">- your.component

  - your-child1.component

  - your.child2.component

-your.pipe

-your.module</pre>
<p>In your.module you will import and declare all your three components and the pipe:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="js">import { NgModule }      from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { YourComponent }  from './path.to.component';
import { YourChild1Component } from './path.to.component';
import { YourChild2Component } from './path.to.component';
import { YourPipe } from './path.to.component';

@NgModule({
  imports:      [ BrowserModule ],
  declarations: [ YourComponent, YourChild1Component, YourChild2Component, YourPipe ],
  bootstrap:    [ AppComponent ]
})
export class AppModule { }</pre>
<p>&nbsp;</p>
<p>Same way you should do in your test class for your tests to work, you import the components and the pipe and add them to your</p>
<pre class="EnlighterJSRAW" data-enlighter-language="js">TestBed.configureTestModule(declarations: [Your component, YourChild1Component, YourChild2Component, YourPipe])</pre>
<p>&nbsp;</p>The post <a href="https://blog.bogdancarpean.com/angular-jasmine-karma-test-when-component-has-own-module/">Angular Jasmine Karma test when component has own module</a> first appeared on <a href="https://blog.bogdancarpean.com">Bogdan's blog</a>.]]></content:encoded>
					
					<wfw:commentRss>https://blog.bogdancarpean.com/angular-jasmine-karma-test-when-component-has-own-module/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
