chore: replace sncrypto web with a published version - skip e2e
This commit is contained in:
@@ -3,22 +3,10 @@
|
||||
/* Used for running mocha tests */
|
||||
const connect = require('connect')
|
||||
const serveStatic = require('serve-static')
|
||||
const fs = require('fs')
|
||||
|
||||
const isDev = process.argv[2] === '--dev'
|
||||
const port = isDev ? 9002 : 9001
|
||||
|
||||
const snCryptoDistFilePath = `${__dirname}/../sncrypto-web/dist/sncrypto-web.js`
|
||||
if (!fs.existsSync(snCryptoDistFilePath)) {
|
||||
console.error(
|
||||
`Could not find sncrypto dist file under: ${snCryptoDistFilePath}. Please consider building the project first`,
|
||||
)
|
||||
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
fs.copyFileSync(snCryptoDistFilePath, `${__dirname}/mocha/vendor/sncrypto-web.js`)
|
||||
|
||||
connect()
|
||||
.use(serveStatic(__dirname))
|
||||
.listen(port, () => {
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<script src="https://unpkg.com/mocha@9.2.2/mocha.js"></script>
|
||||
<script src="https://unpkg.com/chai-subset@1.6.0/lib/chai-subset.js"></script>
|
||||
<script src="https://unpkg.com/sinon@13.0.2/pkg/sinon.js"></script>
|
||||
<script src="./vendor/sncrypto-web.js"></script>
|
||||
<script src="https://unpkg.com/@standardnotes/sncrypto-web@1.14.11/dist/sncrypto-web.js"></script>
|
||||
<script src="../dist/snjs.js"></script>
|
||||
|
||||
<script type="module">
|
||||
|
||||
Reference in New Issue
Block a user