@@ -36,11 +36,9 @@ describe('migration', function () {
3636 if ( ! usingDefaultPreferredAdapters ( ) || window . msIndexedDB ||
3737 isNodeWebkit || skipMigration ) {
3838 skip = true ;
39+ return this . skip ( ) ;
3940 }
4041
41- if ( skip ) {
42- return ;
43- }
4442 // conditionally load all legacy PouchDB scripts to avoid pulling them in
4543 // for test runs that don't test migrations
4644 return Promise . all ( scenarios . map ( function ( scenario ) {
@@ -59,9 +57,6 @@ describe('migration', function () {
5957 } ) ;
6058
6159 after ( function ( ) {
62- if ( skip ) {
63- return ;
64- }
6560 // free memory
6661 delete window . PouchDBVersion110 ;
6762 delete window . PouchDBVersion200 ;
@@ -109,7 +104,7 @@ describe('migration', function () {
109104
110105 beforeEach ( function ( done ) {
111106 if ( skip ) {
112- return done ( ) ;
107+ return this . skip ( ) ;
113108 }
114109
115110 constructors = {
@@ -152,9 +147,6 @@ describe('migration', function () {
152147 } ) ;
153148
154149 afterEach ( function ( done ) {
155- if ( skip ) {
156- return done ( ) ;
157- }
158150 testUtils . cleanup ( [ dbs . first . local , dbs . second . local ] , done ) ;
159151 } ) ;
160152
@@ -166,7 +158,6 @@ describe('migration', function () {
166158 ] ;
167159
168160 it ( 'Testing basic migration integrity' , function ( done ) {
169- if ( skip ) { return done ( ) ; }
170161 var oldPouch =
171162 new dbs . first . pouch ( dbs . first . local , dbs . first . localOpts ,
172163 function ( err ) {
@@ -199,7 +190,6 @@ describe('migration', function () {
199190 } ) ;
200191
201192 it ( "Test basic replication with migration" , function ( done ) {
202- if ( skip ) { return done ( ) ; }
203193 var docs = [
204194 { _id : "0" , integer : 0 , string : '0' } ,
205195 { _id : "1" , integer : 1 , string : '1' } ,
@@ -256,7 +246,6 @@ describe('migration', function () {
256246 } ) ;
257247
258248 it ( "Test basic replication with migration + changes()" , function ( done ) {
259- if ( skip ) { return done ( ) ; }
260249 var docs = [
261250 { _id : "0" , integer : 0 , string : '0' } ,
262251 { _id : "1" , integer : 1 , string : '1' } ,
@@ -309,7 +298,6 @@ describe('migration', function () {
309298
310299 if ( post220 ) {
311300 it ( "Test persistent views don't require update" , function ( done ) {
312- if ( skip ) { return done ( ) ; }
313301 var oldPouch = new dbs . first . pouch ( dbs . first . local , dbs . first . localOpts ) ;
314302 var docs = origDocs . slice ( ) . concat ( [ {
315303 _id : '_design/myview' ,
@@ -349,7 +337,6 @@ describe('migration', function () {
349337
350338 it ( "Test persistent views don't require update, with a value" ,
351339 function ( done ) {
352- if ( skip ) { return done ( ) ; }
353340 var oldPouch = new dbs . first . pouch ( dbs . first . local , dbs . first . localOpts ) ;
354341 var docs = origDocs . slice ( ) . concat ( [ {
355342 _id : '_design/myview' ,
@@ -388,7 +375,6 @@ describe('migration', function () {
388375 } ) ;
389376
390377 it ( 'Returns ok for viewCleanup after modifying view' , function ( done ) {
391- if ( skip ) { return done ( ) ; }
392378 var oldPouch =
393379 new dbs . first . pouch ( dbs . first . local , dbs . first . localOpts ,
394380 function ( err ) {
@@ -438,7 +424,6 @@ describe('migration', function () {
438424 } , done ) ;
439425 } ) ;
440426 it ( 'Remembers local docs' , function ( done ) {
441- if ( skip ) { return done ( ) ; }
442427 var oldPouch =
443428 new dbs . first . pouch ( dbs . first . local , dbs . first . localOpts ,
444429 function ( err ) {
@@ -464,8 +449,6 @@ describe('migration', function () {
464449 } ) ;
465450
466451 it ( 'Testing migration with weird doc ids' , function ( done ) {
467- if ( skip ) { return done ( ) ; }
468-
469452 var origDocs = [
470453 { _id : 'foo::bar::baz' } ,
471454 { _id : '\u0000foo\u0000' }
@@ -492,8 +475,6 @@ describe('migration', function () {
492475 if ( post306 ) {
493476 // attachments didn't really work until this release
494477 it ( '#2818 Testing attachments with compaction of dups' , function ( ) {
495- if ( skip ) { return ; }
496-
497478 var docs = [
498479 {
499480 _id : 'doc1' ,
@@ -535,8 +516,6 @@ describe('migration', function () {
535516 } ) ;
536517
537518 it ( '#2818 Testing attachments with compaction of dups 2' , function ( ) {
538- if ( skip ) { return ; }
539-
540519 var docs = [
541520 {
542521 _id : 'doc1' ,
@@ -579,8 +558,6 @@ describe('migration', function () {
579558 } ) ;
580559
581560 it ( '#2818 Testing attachments with compaction of dups 3' , function ( ) {
582- if ( skip ) { return ; }
583-
584561 var docs = [
585562 {
586563 _id : 'doc1' ,
@@ -637,8 +614,6 @@ describe('migration', function () {
637614 } ) ;
638615
639616 it ( '#2818 Testing attachments with compaction of dups 4' , function ( ) {
640- if ( skip ) { return ; }
641-
642617 var docs = [
643618 {
644619 _id : 'doc1' ,
@@ -691,8 +666,6 @@ describe('migration', function () {
691666 } ) ;
692667
693668 it ( '#2818 Testing attachments with compaction of dups 5' , function ( ) {
694- if ( skip ) { return ; }
695-
696669 var docs = [
697670 {
698671 _id : 'doc1' ,
@@ -766,8 +739,6 @@ describe('migration', function () {
766739 } ) ;
767740
768741 it ( '#2818 Testing attachments with compaction of dups 6' , function ( ) {
769- if ( skip ) { return ; }
770-
771742 var docs = [ ] ;
772743
773744 for ( var i = 0 ; i < 40 ; i ++ ) {
@@ -830,8 +801,6 @@ describe('migration', function () {
830801 } ) ;
831802
832803 it ( '#2818 compaction of atts after many revs' , function ( ) {
833- if ( skip ) { return ; }
834-
835804 var oldPouch = new dbs . first . pouch (
836805 dbs . first . local , dbs . first . localOpts ) ;
837806
@@ -860,8 +829,6 @@ describe('migration', function () {
860829 } ) ;
861830
862831 it ( '#2890 PNG content after migration' , function ( ) {
863- if ( skip ) { return ; }
864-
865832 var oldPouch = new dbs . first . pouch (
866833 dbs . first . local , dbs . first . localOpts ) ;
867834
@@ -906,10 +873,6 @@ describe('migration', function () {
906873
907874 if ( post320 ) {
908875 it ( '#3136 Testing later winningSeqs' , function ( ) {
909- if ( skip ) {
910- return ;
911- }
912-
913876 var tree = [
914877 [
915878 {
@@ -989,10 +952,6 @@ describe('migration', function () {
989952
990953 if ( post360 ) {
991954 it ( '#3646 - Should finish with 0 documents' , function ( ) {
992- if ( skip ) {
993- return ;
994- }
995-
996955 var data = [
997956 {
998957 "docs" : [
0 commit comments