Skip to content

Instantly share code, notes, and snippets.

View wescopeland's full-sized avatar

Wes Copeland wescopeland

View GitHub Profile
@wescopeland
wescopeland / awesome-entity.model.ts
Last active June 13, 2019 21:41
entity-data.service
export interface AwesomeEntity {
id: number;
}
@wescopeland
wescopeland / notification.service.spec.ts
Last active June 15, 2019 19:53
Notification service with Spectator
import { SpectatorService, SpyObject, createService } from '@netbasal/spectator/jest';
import { MatSnackBar } from '@angular/material/snack-bar';
import { NotificationService } from './notification.service';
describe('Service: NotificationService', () => {
let snackBar: SpyObject<MatSnackBar>;
let spectator: SpectatorService<NotificationService> = createService({
service: NotificationService,
@wescopeland
wescopeland / wallaby.js
Last active June 12, 2019 22:15
Sample Wallaby config for Angular+Jest
const ngxWallabyJest = require('ngx-wallaby-jest');
module.exports = function(wallaby) {
return {
files: [
'src/**/*.+(ts|html|json|snap|css|less|sass|scss|jpg|jpeg|gif|png|svg)',
'tsconfig.json',
'jest.config.js',
'tsconfig.spec.json',
'!src/**/*.spec.ts'
@wescopeland
wescopeland / jest.config.js
Last active June 25, 2019 12:09
Sample Angular Jest config
module.exports = {
globals: {
'ts-jest': {
tsConfig: './tsconfig.spec.json',
stringifyContentPathRegex: '\\.html$',
astTransformers: [
require.resolve('jest-preset-angular/InlineHtmlStripStylesTransformer')
]
}
},
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->