Skip to content

Commit

Permalink
fix: make contract.Spec tests work in browser
Browse files Browse the repository at this point in the history
importing from `/lib` meant it wasn't actually working in the browser

this fixes it, but also requires the karma config tweak to make it work
as expected

Big thanks to @Shaptic

Co-authored-by: George <Shaptic@users.noreply.github.com>
  • Loading branch information
chadoh and Shaptic committed May 15, 2024
1 parent 7883dc3 commit 78e13e0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion config/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module.exports = function (config) {
],

preprocessors: {
'../test/**/*.js': ['webpack']
'../test/**/*.{js,ts}': ['webpack']
},

webpack: webpackConfig,
Expand Down
2 changes: 1 addition & 1 deletion test/unit/spec/contract_spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { xdr, Address, contract, Keypair } from "../../../lib";
import { xdr, Address, contract, Keypair } from "../../..";
import { JSONSchemaFaker } from "json-schema-faker";

import spec from "../spec.json";
Expand Down

0 comments on commit 78e13e0

Please sign in to comment.