mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Fix node-tests on OSX by explicitly requiring modules with relative paths.
This commit is contained in:
1
node-tests/node-shims.ts
Normal file
1
node-tests/node-shims.ts
Normal file
@@ -0,0 +1 @@
|
||||
declare var require: any;
|
||||
@@ -1,5 +1,6 @@
|
||||
import {assert} from "chai";
|
||||
import xml = require('xml');
|
||||
import * as xmlModule from "xml";
|
||||
var xml: typeof xmlModule = require("../tns-core-modules/xml");
|
||||
|
||||
describe("angular xml parser", () => {
|
||||
let last_element = null;
|
||||
@@ -7,7 +8,7 @@ describe("angular xml parser", () => {
|
||||
let parser = null;
|
||||
|
||||
beforeEach(() => {
|
||||
parser = new xml.XmlParser(function (event: xml.ParserEvent) {
|
||||
parser = new xml.XmlParser(function (event: xmlModule.ParserEvent) {
|
||||
switch (event.eventType) {
|
||||
case xml.ParserEventType.StartElement:
|
||||
last_element = event.elementName;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import {assert} from "chai";
|
||||
import xml = require('xml');
|
||||
import * as xmlModule from "xml";
|
||||
var xml: typeof xmlModule = require("../tns-core-modules/xml");
|
||||
|
||||
describe("xml parser", () => {
|
||||
let last_element = null;
|
||||
@@ -8,7 +9,7 @@ describe("xml parser", () => {
|
||||
let parser = null;
|
||||
|
||||
beforeEach(() => {
|
||||
parser = new xml.XmlParser(function (event: xml.ParserEvent) {
|
||||
parser = new xml.XmlParser(function (event: xmlModule.ParserEvent) {
|
||||
switch (event.eventType) {
|
||||
case xml.ParserEventType.StartElement:
|
||||
last_element = event.elementName;
|
||||
|
||||
Reference in New Issue
Block a user