-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: mix sync methods to default export
- Loading branch information
1 parent
39520e1
commit 8a5ab95
Showing
5 changed files
with
17 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import { kill, lookup, tree } from './ps.js' | ||
import { kill, lookup, lookupSync, tree, treeSync } from './ps.js' | ||
|
||
export type * from './ps.js' | ||
export { kill, lookup, tree } from './ps.js' | ||
export default { lookup, kill, tree } | ||
export { kill, lookup, lookupSync, tree, treeSync } from './ps.js' | ||
export default { kill, lookup, lookupSync, tree, treeSync } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,13 @@ | ||
const assert = require('node:assert') | ||
const { describe, it } = require('node:test') | ||
const { lookup, kill } = require('@webpod/ps') | ||
const { lookup, kill, tree } = require('@webpod/ps') | ||
|
||
describe('cjs index()', () => { | ||
it('has proper exports', () => { | ||
assert.equal(typeof lookup, 'function') | ||
assert.equal(typeof lookup.sync, 'function') | ||
assert.equal(typeof tree, 'function') | ||
assert.equal(typeof tree.sync, 'function') | ||
assert.equal(typeof kill, 'function') | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,13 @@ | ||
import assert from 'node:assert' | ||
import { describe, it } from 'node:test' | ||
import { lookup, kill } from '@webpod/ps' | ||
import { lookup, kill, tree } from '@webpod/ps' | ||
|
||
describe('mjs index', () => { | ||
it('has proper exports', () => { | ||
assert.equal(typeof lookup, 'function') | ||
assert.equal(typeof lookup.sync, 'function') | ||
assert.equal(typeof tree, 'function') | ||
assert.equal(typeof tree.sync, 'function') | ||
assert.equal(typeof kill, 'function') | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,18 @@ | ||
import * as assert from 'node:assert' | ||
import { describe, it } from 'node:test' | ||
import ps, { kill, lookup, tree } from '../../main/ts/index.ts' | ||
import ps, { kill, lookup, tree, treeSync, lookupSync } from '../../main/ts/index.ts' | ||
|
||
describe('index', () => { | ||
it('has proper exports', () => { | ||
assert.equal(ps.lookup, lookup) | ||
assert.equal(ps.lookup.sync, lookupSync) | ||
assert.equal(ps.kill, kill) | ||
assert.equal(ps.tree, tree) | ||
assert.equal(ps.tree.sync, treeSync) | ||
assert.equal(typeof lookup, 'function') | ||
assert.equal(typeof lookupSync, 'function') | ||
assert.equal(typeof kill, 'function') | ||
assert.equal(typeof tree, 'function') | ||
assert.equal(typeof treeSync, 'function') | ||
}) | ||
}) |