Skip to content

Instantly share code, notes, and snippets.

View timdeschryver's full-sized avatar
👟

Tim Deschryver timdeschryver

👟
View GitHub Profile
@Component({
selector: 'person',
template: `
<div [formGroup]="form">
<div>
<label>Name</label>
<input type="text" formControlName="name" />
</div>
<div>
{
"NgRx Action": {
"scope": "typescript",
"prefix": "ca",
"description": "Creates an NgRx Action",
"body": ["export const ${1:action} = createAction('[${2:Source}] ${3:Event}');"]
},
"NgRx Action with props": {
"scope": "typescript",
"prefix": "cap",
@Effect()
online = merge(
of(navigator.onLine),
fromEvent(window, 'online').pipe(mapTo(true)),
fromEvent(window, 'offline').pipe(mapTo(false)),
).pipe(map(online => online ? new IsOnline() : new IsOffline()));
- release:
requires:
- test-app
filters:
branches:
only: master
{
...
"release": {
"pkgRoot": "dist/ngx-testing-library"
},
...
}
version: 2
job_defaults: &job_defaults
docker:
- image: circleci/node:latest
working_directory: ~/project/repo
cache_key: &cache_key ngx-testing-library-deps-cache-{{ .Branch }}-{{ checksum "package-lock.json" }}
dist_key: &dist_key ngx-testing-library-dist-{{ .Revision }}
version: 2
jobs:
build:
docker:
- image: 'circleci/node:latest'
steps:
- checkout
- run:
name: install
command: npm install
type description release type
test('getCartSummary only shows products with an amount', () => {
const cartItems: CartItem[] = [
{
amount: 1,
product: createProduct({ sku: 'foo' }),
},
{
amount: 0,
product: createProduct({ sku: 'bar' }),
},
const testCases = [
{
name: 'getProducts',
selector: getProducts,
state: createCatalogState(),
},
{
name: 'getProductSkus',
selector: getProductSkus,
state: createCatalogState(),