@pocket-architect/core 0.1.7 → 0.1.8

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.
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var tslib_1 = require("tslib");
4
+ var EntityId_1 = require("./EntityId");
5
+ var TestId = /** @class */ (function (_super) {
6
+ tslib_1.__extends(TestId, _super);
7
+ function TestId() {
8
+ return _super !== null && _super.apply(this, arguments) || this;
9
+ }
10
+ return TestId;
11
+ }(EntityId_1.EntityId));
12
+ describe('ValueObject', function () {
13
+ test('base', function () { return tslib_1.__awaiter(void 0, void 0, void 0, function () {
14
+ var id, id2, id3;
15
+ return tslib_1.__generator(this, function (_a) {
16
+ id = new TestId('1');
17
+ id2 = new EntityId_1.EntityId('1');
18
+ id3 = new TestId('1');
19
+ expect(id).toEqual(id3);
20
+ expect(id).not.toEqual(id2);
21
+ return [2 /*return*/];
22
+ });
23
+ }); });
24
+ });
25
+ //# sourceMappingURL=EntityId.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EntityId.spec.js","sourceRoot":"","sources":["../src/EntityId.spec.ts"],"names":[],"mappings":";;;AAAA,uCAAsC;AAEtC;IAAqB,kCAAQ;IAA7B;;IACA,CAAC;IAAD,aAAC;AAAD,CAAC,AADD,CAAqB,mBAAQ,GAC5B;AAED,QAAQ,CAAC,aAAa,EAAE;IACtB,IAAI,CAAC,MAAM,EAAE;;;YACL,EAAE,GAAG,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC;YACrB,GAAG,GAAG,IAAI,mBAAQ,CAAC,GAAG,CAAC,CAAC;YACxB,GAAG,GAAG,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC;YAC5B,MAAM,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;YACxB,MAAM,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;;;SAC7B,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pocket-architect/core",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "scripts": {
@@ -0,0 +1,14 @@
1
+ import { EntityId } from './EntityId';
2
+
3
+ class TestId extends EntityId {
4
+ }
5
+
6
+ describe('ValueObject', () => {
7
+ test('base', async () => {
8
+ const id = new TestId('1');
9
+ const id2 = new EntityId('1');
10
+ const id3 = new TestId('1');
11
+ expect(id).toEqual(id3);
12
+ expect(id).not.toEqual(id2);
13
+ });
14
+ });