@@ -13,8 +13,8 @@ const directions = openroute({
1313 }
1414} ) . operation ;
1515
16- describe ( 'openroute directions' , async function ( ) {
17- await it ( 'turn-by-turn' , async function ( ) {
16+ describe ( 'openroute directions' , async ( ) => {
17+ await it ( 'turn-by-turn' , async ( ) => {
1818 response = require ( './fixtures/turnbyturn' ) ;
1919
2020 const query = {
@@ -42,15 +42,11 @@ describe('openroute directions', async function () {
4242 result . segments [ 0 ] . should . have . property ( 'distance' , 2226 ) ;
4343 result . segments [ 0 ] . should . have . property ( 'path' ) . with . length ( 42 ) ;
4444 result . segments [ 0 ] . should . have . property ( 'instructions' , 'Head south on K 7931' ) ;
45- result . segments
46- . reduce ( function ( len , seg ) {
47- return len + seg . path . length - 1 ;
48- } , 0 )
49- . should . equal ( 7964 ) ;
45+ result . segments . reduce ( ( len , seg ) => len + seg . path . length - 1 , 0 ) . should . equal ( 7964 ) ;
5046 result . should . have . property ( 'provider' , 'openroute' ) ;
5147 } ) ;
5248
53- await it ( 'empty' , async function ( ) {
49+ await it ( 'empty' , async ( ) => {
5450 response = require ( './fixtures/empty' ) ;
5551
5652 const query = {
@@ -78,15 +74,11 @@ describe('openroute directions', async function () {
7874 result . segments [ 0 ] . should . have . property ( 'distance' , 0 ) ;
7975 result . segments [ 0 ] . should . have . property ( 'path' ) . with . length ( 0 ) ;
8076 result . segments [ 0 ] . should . have . property ( 'instructions' , 'Head east' ) ;
81- result . segments
82- . reduce ( function ( len , seg ) {
83- return len + seg . path . length ;
84- } , 0 )
85- . should . equal ( 0 ) ;
77+ result . segments . reduce ( ( len , seg ) => len + seg . path . length , 0 ) . should . equal ( 0 ) ;
8678 result . should . have . property ( 'provider' , 'openroute' ) ;
8779 } ) ;
8880
89- await it ( 'ferry' , async function ( ) {
81+ await it ( 'ferry' , async ( ) => {
9082 response = require ( './fixtures/ferry' ) ;
9183
9284 const query = {
@@ -122,7 +114,7 @@ describe('openroute directions', async function () {
122114 result . should . have . property ( 'provider' , 'openroute' ) ;
123115 } ) ;
124116
125- await it ( 'too long roundabout route' , async function ( ) {
117+ await it ( 'too long roundabout route' , async ( ) => {
126118 response = require ( './fixtures/roundabout-too-long' ) ;
127119
128120 const query = {
@@ -135,7 +127,7 @@ describe('openroute directions', async function () {
135127 should . not . exist ( result ) ;
136128 } ) ;
137129
138- await it ( 'rough surface' , async function ( ) {
130+ await it ( 'rough surface' , async ( ) => {
139131 response = require ( './fixtures/rough' ) ;
140132
141133 const query = {
@@ -166,7 +158,7 @@ describe('openroute directions', async function () {
166158 result . should . have . property ( 'provider' , 'openroute' ) ;
167159 } ) ;
168160
169- await it ( 'toll roads' , async function ( ) {
161+ await it ( 'toll roads' , async ( ) => {
170162 response = require ( './fixtures/tolls' ) ;
171163
172164 const query = {
0 commit comments