mirror of
				https://github.com/NativeScript/NativeScript.git
				synced 2025-11-04 04:18:52 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			19 lines
		
	
	
		
			638 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
		
			638 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
import { startServer, stopServer, ITestReporter, nsCapabilities, LogImageType } from "nativescript-dev-appium";
 | 
						|
const addContext = require("mochawesome/addContext");
 | 
						|
 | 
						|
const testReporterContext = <ITestReporter>{};
 | 
						|
testReporterContext.name = "mochawesome";
 | 
						|
testReporterContext.reportDir = "mochawesome-report";
 | 
						|
testReporterContext.log = addContext;
 | 
						|
nsCapabilities.testReporter = testReporterContext;
 | 
						|
 | 
						|
before("start server", async function () {
 | 
						|
    nsCapabilities.testReporter.context = this;
 | 
						|
    await startServer();
 | 
						|
});
 | 
						|
 | 
						|
after("stop server", async function () {
 | 
						|
    nsCapabilities.testReporter.context = this;
 | 
						|
    await stopServer();
 | 
						|
});
 |