[#1452] Fix text preview tests
Merge pull request #1452 from okfn/1452-textpreview-tests

Text preview tests fail when using production JS scripts