@dismissible/nestjs-dismissible-item 0.0.2-canary.738340d.0 → 0.0.2-canary.c91edbc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dismissible/nestjs-dismissible-item",
3
- "version": "0.0.2-canary.738340d.0",
3
+ "version": "0.0.2-canary.c91edbc.0",
4
4
  "description": "Dismissible item library",
5
5
  "main": "./src/index.js",
6
6
  "types": "./src/index.d.ts",
@@ -28,6 +28,9 @@
28
28
  "license": "MIT",
29
29
  "repository": {
30
30
  "type": "git",
31
- "url": ""
31
+ "url": "https://github.com/DismissibleIo/dismissible-api"
32
+ },
33
+ "publishConfig": {
34
+ "access": "public"
32
35
  }
33
36
  }
@@ -13,25 +13,27 @@ describe('DismissibleItemFactory', () => {
13
13
  const item = factory.create({
14
14
  id: 'test-id',
15
15
  createdAt: new Date('2024-01-15T10:00:00.000Z'),
16
+ userId: 'test-user-id',
16
17
  });
17
18
 
18
19
  expect(item).toBeInstanceOf(DismissibleItemDto);
19
20
  expect(item.id).toBe('test-id');
20
21
  expect(item.createdAt).toEqual(new Date('2024-01-15T10:00:00.000Z'));
22
+ expect(item.userId).toBe('test-user-id');
21
23
  });
22
24
 
23
25
  it('should handle optional properties when undefined', () => {
24
26
  const item = factory.create({
25
27
  id: 'test-id',
26
28
  createdAt: new Date('2024-01-15T10:00:00.000Z'),
27
- userId: undefined,
29
+ userId: 'test-user-id',
28
30
  metadata: undefined,
29
31
  dismissedAt: undefined,
30
32
  });
31
33
 
32
34
  expect(item.id).toBe('test-id');
33
35
  expect(item.createdAt).toEqual(new Date('2024-01-15T10:00:00.000Z'));
34
- expect(item.userId).toBeUndefined();
36
+ expect(item.userId).toBe('test-user-id');
35
37
  expect(item.metadata).toBeUndefined();
36
38
  expect(item.dismissedAt).toBeUndefined();
37
39
  });
@@ -8,7 +8,7 @@ import { BaseMetadata, DismissibleItemDto } from './dismissible-item';
8
8
  export interface ICreateDismissibleItemOptions<TMetadata extends BaseMetadata> {
9
9
  id: string;
10
10
  createdAt: Date;
11
- userId?: string;
11
+ userId: string;
12
12
  metadata?: TMetadata;
13
13
  dismissedAt?: Date;
14
14
  }