Files
pyscript/pyscriptjs/__mocks__/_pyscript.js
Jeff Glass 687b93d148 Import PyScript Version into Python Runtime (#958)
* Import current version as PyScript.__version__ and PyScript.version_info

* Add integration, python unit tests
 
* Mock pyscript.py with __mocks__/pyscript.js to make jest tests happy
2022-11-18 11:49:45 -06:00

15 lines
457 B
JavaScript

/**
* this file mocks the `src/python/pyscript.py` file
* since importing of `.py` files isn't usually supported
* inside JS/TS files.
*
* It sets the value of whatever is imported from
* `src/python/pyscript.py` the contents of that file
*
* This is needed since the imported object is further
* passed to a function which only accepts a string.
*/
const fs = require('fs');
module.exports = fs.readFileSync('./src/python/pyscript.py', 'utf8');