Skip to content

Commit

Permalink
feat(dependencies): upgrade to Angular 11, Typescript 4.1
Browse files Browse the repository at this point in the history
BREAKING CHANGE - peer dependencies updated to work in Angular 11 ecosystem
  • Loading branch information
MiroslavKral committed Sep 20, 2021
1 parent 9381a0d commit 6fc5a78
Show file tree
Hide file tree
Showing 6 changed files with 5,244 additions and 3,355 deletions.
26 changes: 13 additions & 13 deletions lib/model/model.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ describe('Model', () => {
it('should expose model data in observable', () => {
const model = modelFactory.create({ value: 'test' });

model.data$.subscribe(data =>
model.data$.subscribe((data) =>
assert.deepStrictEqual(data, { value: 'test' })
);
});
Expand All @@ -31,7 +31,7 @@ describe('Model', () => {
it('should use immutable data in exposed observable by default', () => {
const model = modelFactory.create({ value: 'test' });

model.data$.subscribe(data => {
model.data$.subscribe((data) => {
data.value = 'changed';
assert.deepStrictEqual(model.get(), { value: 'test' });
});
Expand All @@ -43,7 +43,7 @@ describe('Model', () => {
const modelData = model.get();
modelData.value = 'changed';

model.data$.subscribe(data => {
model.data$.subscribe((data) => {
assert.deepStrictEqual(data, { value: 'test' });
});
});
Expand All @@ -56,15 +56,15 @@ describe('Model', () => {

changedData.value = 'changed even more';

model.data$.subscribe(data => {
model.data$.subscribe((data) => {
assert.deepStrictEqual(data, { value: 'changed' });
});
});

it('should use mutable data in exposed observable when configured', () => {
const model = modelFactory.createMutable({ value: 'test' });

model.data$.subscribe(data => {
model.data$.subscribe((data) => {
data.value = 'changed';
assert.deepStrictEqual(model.get(), { value: 'changed' });
});
Expand All @@ -76,7 +76,7 @@ describe('Model', () => {
const modelData = model.get();
modelData.value = 'changed';

model.data$.subscribe(data => {
model.data$.subscribe((data) => {
assert.deepStrictEqual(data, { value: 'changed' });
});
});
Expand All @@ -89,7 +89,7 @@ describe('Model', () => {

changedData.value = 'changed even more';

model.data$.subscribe(data => {
model.data$.subscribe((data) => {
assert.deepStrictEqual(data, { value: 'changed even more' });
});
});
Expand Down Expand Up @@ -137,22 +137,22 @@ describe('Model', () => {

model2.set({ value: 'changed' });

model1.data$.subscribe(data =>
model1.data$.subscribe((data) =>
assert.deepStrictEqual(data, { value: 'test1' })
);
model2.data$.subscribe(data =>
model2.data$.subscribe((data) =>
assert.deepStrictEqual(data, { value: 'changed' })
);
});

it('should not share subscription by default', () => {
const model = modelFactory.create({ value: 'test' });

model.data$.subscribe(data => {
model.data$.subscribe((data) => {
data.value = 'changed';
assert.deepStrictEqual(data, { value: 'changed' });
});
model.data$.subscribe(data => {
model.data$.subscribe((data) => {
assert.deepStrictEqual(data, { value: 'test' });
});
});
Expand All @@ -162,11 +162,11 @@ describe('Model', () => {
value: 'test'
});

model.data$.subscribe(data => {
model.data$.subscribe((data) => {
data.value = 'changed';
assert.deepStrictEqual(data, { value: 'changed' });
});
model.data$.subscribe(data => {
model.data$.subscribe((data) => {
assert.deepStrictEqual(data, { value: 'changed' });
});
});
Expand Down
Loading

0 comments on commit 6fc5a78

Please sign in to comment.