We have moved to a new Sailfish OS Forum. Please start new discussions there.
1 | initial version | posted 2019-12-19 08:34:53 +0200 |
Dear all it took me weeks to come to a solution, so would like to share it:
problem: have native app in qml and js using qt.localstorage for storage. the app is a shopping list so has some 3-4 tables and a bit of logic. the db model did evolve over time, so db upgrades are an issue. manual testing on emulator / phone are time consuming
i have windows background, c# a bit of typescript, so how can i run tests for the db logic on windows laptop ? how can i get rid of those boring js runtime bugs ?
solution: - sqlite3 for windows - typescript - visual studio code - sqlite-sync npm package for sqlite access from node.js - mocha for tests - db access wrapper
the whole approach will also work on any os able to run node.js and sqlite
code can be found: https://github.com/PawelSpoon/harbour-olive-goes-shopping
2 | retagged |
Dear all it took me weeks to come to a solution, so would like to share it:
problem: have native app in qml and js using qt.localstorage for storage. the app is a shopping list so has some 3-4 tables and a bit of logic. the db model did evolve over time, so db upgrades are an issue. manual testing on emulator / phone are time consuming
i have windows background, c# a bit of typescript, so how can i run tests for the db logic on windows laptop ? how can i get rid of those boring js runtime bugs ?
solution: - sqlite3 for windows - typescript - visual studio code - sqlite-sync npm package for sqlite access from node.js - mocha for tests - db access wrapper
the whole approach will also work on any os able to run node.js and sqlite
code can be found: https://github.com/PawelSpoon/harbour-olive-goes-shopping
3 | No.3 Revision |
Dear all it took me weeks to come to a solution, so would like to share it:
problem: have native app in qml and js using qt.localstorage for storage. the app is a shopping list so has some 3-4 tables and a bit of logic. the db model did evolve over time, so db upgrades are an issue. manual testing on emulator / phone are time consuming
i have windows background, c# a bit of typescript, so how can i run tests for the db logic on windows laptop ? how can i get rid of those boring js runtime bugs ?
solution: - sqlite3 for windows - typescript - visual studio code - sqlite-sync npm package for sqlite access from node.js - mocha for tests - db access wrapper
the whole approach will also work on any os able to run node.js and sqlite
code can be found: https://github.com/PawelSpoon/harbour-olive-goes-shopping
did move to linux: (so here is the update)
you will need to install ts-node npm install -g ts-node
rest should be fine due to package.config i am using now Git-Cola as there is no github-desktop at them moment for linux. the snap pacakage did not work for me.