-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
working with external js libraries #96
Comments
+1, I have the same problem |
haha.. :) I've managed to make it work, with the mtt you can add js to the html environment. it's pretty neat, use example 2, custom templates |
OK, I get the idea. But I can not get it to work (its all not documented). How does your template look? |
Okay, what I've done, is to put the folder https://github.com/massiveinteractive/MassiveUnit/tree/master/examples/02_customTemplates/munit/template to my project as testTemplates and https://github.com/massiveinteractive/MassiveUnit/tree/master/src/resource as testResources. for js_runner-html.mtt I added <script type="text/JavaScript" language="JavaScript" src="js/pixi.dev.js"></script>in testResources folder, I have added js/pixi.dev.js as well. and the .munit file looks like this: |
Hey, thanks,
|
I have <script type="text/JavaScript" language="JavaScript" src="js/printclient.js"></script> in the mtt as well, and if(typeof massive=='undefined') massive = {} var queue = []; var COLOR_PASSED = "#A9D1AC"; /**
function emptyQueue()
} ////////// var initialized = false; var currentLine = null; var currentClassDiv = null; var missingCoverageDiv = null; var MUNIT_HEADER = "munit-header"; function setResult(result)
} function setResultBackground(result) function debug(value) function initialize()
} function munitPrintLine(value, clazz)
} function munitPrint(value) function munitTrace(value)
} ///// TEST APIS /////// //prints to the current test div
} function updateTestSummary(value) function addTestTrace(value)
} function addTestPass(value) function addTestFail(value) function addTestError(value) function addTestIgnore(value) function addTestCoverageClass(coverageClass, percentage)
} function addTestCoverageItem(value) function setTestClassResult(level)
} /////////// FINAL REPORTS /////////// function createCoverageReport(value)
} var currentCoverageReportID = null; function addMissingCoverageClass(coverageClass, percentage)
} function addCoverageReportSection(title, contents)
} function addCoverageSummary(value)
} //////////
} ////////////////////// INTERNAL ////////////////// function createTestDiv(id) /* */
} /* */ function createDiv(id, clazz) { if(id != null && document.getElementById(id) != null) { return document.getElementById(id); }
} function createLineBreak() function createToggle(id)
} function removeToggle(id)
} function toggleVisibility(id, forceOpen)
} function convertStringToId(value) |
Hi!
I'm working on a js only project, and I'm trying to make my unit tests work with pixi externs, (https://github.com/adireddy/haxe-pixi), but I don't know how to include pixi.js to the complied test.
In the app itself, I just add it to the html in a script tag.
so the following code will throw the error below.
import pixi.display.DisplayObjectContainer;
[...]
var doc:DisplayObjectContainer = new DisplayObjectContainer();
ReferenceError: PIXI is not defined at ...#testExample
any ideas how to test a class, what has a pixi object inside?
The text was updated successfully, but these errors were encountered: