-
Notifications
You must be signed in to change notification settings - Fork 215
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
40 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { Decimal } from '@cosmjs/math'; |
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// A test to verify that importing @cosmsjs/math into an ESM via bundleSource | ||
// can see the exported Decimal constructor, which was at time of writing obscured | ||
// by https://github.com/endojs/endo/pull/2330, temporarily mitigated by a patch. | ||
// Placed here only because Agoric CLI depends on both bundleSource and CosmJS math. | ||
|
||
import test from '@endo/ses-ava/prepare-endo.js'; | ||
import url from 'url'; | ||
import bundleSource from '@endo/bundle-source'; | ||
import { importBundle } from '@endo/import-bundle'; | ||
|
||
test('bundled @comjs/math exports Decimal', async t => { | ||
const entryPath = url.fileURLToPath( | ||
new URL('bundle-cosmjs-math.js', import.meta.url), | ||
); | ||
const bundle = await bundleSource(entryPath); | ||
const ns = await importBundle(bundle); | ||
t.not(ns.Decimal === undefined); | ||
}); |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
export { Decimal } from '@cosmjs/math'; |
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// A test to verify that importing @cosmsjs/math into an ESM via bundleSource | ||
// can see the exported Decimal constructor, which was at time of writing obscured | ||
// by https://github.com/endojs/endo/pull/2330, temporarily mitigated by a patch. | ||
// Placed here only because Agoric CLI depends on both bundleSource and CosmJS math. | ||
|
||
import test from '@endo/ses-ava/prepare-endo.js'; | ||
import url from 'url'; | ||
import bundleSource from '@endo/bundle-source'; | ||
import { importBundle } from '@endo/import-bundle'; | ||
|
||
test('bundled @comjs/math exports Decimal', async t => { | ||
const entryPath = url.fileURLToPath( | ||
new URL('bundle-cosmjs-math.js', import.meta.url), | ||
); | ||
const bundle = await bundleSource(entryPath); | ||
const ns = await importBundle(bundle); | ||
t.not(ns.Decimal, undefined); | ||
}); |