Skip to content

Commit

Permalink
Fix unit test not working on GitHub #52.E Tried to clear npm cache.
Browse files Browse the repository at this point in the history
  • Loading branch information
CookingWithCale committed Dec 18, 2023
1 parent 3b0726b commit eaf2a7e
Showing 3 changed files with 10 additions and 42 deletions.
35 changes: 0 additions & 35 deletions .github/workflows.unused/publish.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Jest
name: Test
on: push
jobs:
test:
@@ -26,7 +26,7 @@ jobs:
# Install required deps for action
- name: Install Dependencies
run: npm install
run: npm cache clean –force && npm install

# Finally, run our tests
- name: Run the tests
13 changes: 8 additions & 5 deletions Source/index.ts
Original file line number Diff line number Diff line change
@@ -579,7 +579,8 @@ export function LLIDPack(timestamp: bigint, ticker: bigint): LLID {
export function LLIDPrint(llid: LLID) {
const [ Timestamp, Ticker ] = LLIDUnpack(llid);
const Time = new Date(Number(Timestamp));
return Time.toISOString().split('T')[0] + ' tick:' + Ticker;
return 'LLID:{ ' + Time.toISOString().split('T')[0] + ' tick:' + Ticker
+ ' }';
}

// Generates the next Local LID.
@@ -658,8 +659,9 @@ export function LIDUnpack(lid: LLID) {
export function LIDPrint(lid: LLID) {
const [ Timestamp, Ticker, Source ] = LIDUnpack(lid);
const Time = new Date(Number(Timestamp));
return Time.toISOString().split('T')[0] + ' tick:' + Ticker
+ ' source:' + Source;
return 'LLID:{ timestamp: ' + Time.toISOString().split('T')[0]
+ '\n tick :' + Ticker
+ '\n source :' + Source + ' }';
}

// Gets the lid_source.
@@ -765,8 +767,9 @@ export function LID64Unpack(lid: LLID) {
export function LID64Print(lid: LLID) {
const [ Timestamp, Ticker, Source ] = LID64Unpack(lid);
const Time = new Date(Number(Timestamp));
return Time.toISOString().split('T')[0] + ' tick:' + Ticker
+ ' source:' + Source;
return 'LID64:{ timestamp:' + Time.toISOString().split('T')[0]
+ '\n tick :' + Ticker
+ '\n source :' + Source + ' }';
}

// Generates the next 64-bit/128-bit LID.

0 comments on commit eaf2a7e

Please sign in to comment.