1- import client from './lib/httpClient.js'
2- import logger from './lib/logger.js'
3- import utils from './lib/utils.js'
4- const log = logger ( utils . getPackageName ( ) )
1+ const client = require ( './lib/httpClient' ) ;
2+ const logger = require ( './lib/logger' ) ;
3+ const utils = require ( './lib/utils' ) ;
4+ const log = logger ( require ( '../package.json' ) . name ) ;
55
6- export async function isSmartUIRunning ( ) {
6+ async function isSmartUIRunning ( ) {
77 try {
88 await client . isSmartUIRunning ( ) ;
99 return true ;
@@ -13,7 +13,7 @@ export async function isSmartUIRunning() {
1313 }
1414}
1515
16- export async function fetchDOMSerializer ( ) {
16+ async function fetchDOMSerializer ( ) {
1717 try {
1818 return await client . fetchDOMSerializer ( ) ;
1919 } catch ( error ) {
@@ -22,7 +22,7 @@ export async function fetchDOMSerializer() {
2222 }
2323}
2424
25- export async function postSnapshot ( snapshotDOM , snapshotName , testType ) {
25+ async function postSnapshot ( snapshotDOM , snapshotName , testType ) {
2626 const data = JSON . stringify ( {
2727 snapshot : {
2828 dom : snapshotDOM ,
@@ -38,3 +38,9 @@ export async function postSnapshot(snapshotDOM, snapshotName, testType) {
3838 throw new Error ( `post snapshot failed` ) ;
3939 }
4040}
41+
42+ module . exports = {
43+ isSmartUIRunning,
44+ fetchDOMSerializer,
45+ postSnapshot
46+ }
0 commit comments