diff --git a/.travis.yml b/.travis.yml index d347df9..4d7545a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,23 +1,31 @@ -language: node_js +language: +- node_js +env: + global: + - NODE_VERSION=6 + - secure: H+Qtnvo8ZsQ5AwytSqVmZbxGYG0ncLFT35i3XKvySwTqlnsaLoZ7HxSti9PireNzJ3y3NT8ePlv1OlLfSFJ7jU7GLkHq+v9O/1duBc5RFtYliwIjlVjotkhS8vX6HlMakL4xeaeU72E6DPPZN36MdMwrDEgZUN3TGEFNiFK50/t8CYPb1avvSwfxbTK/xgtm0u3IfSydOhpq0DrrwhbZSk/krgvfejil3CZ377Z892Hagcsks7GHvz7yVhW5z6kFyW7Th4y6mW/v21OgGKdxtCJCpHXT3JetOlpbEtqtxIZGogNOyXtzCHFvrbZmw3TPH4/0/HMkIy4o2o9rcay23W6YvoBELQDZMVTgf/6yyxt19eMFUXuofNO3vSYu9ALRwoX9jIE7JqoA9g4BZ4vGXf1ucG/Ak6gP/C7+kXYTgTL254RuTQeRq7fwg4ootKINm7DjPwAXUs+Kpb0XtnPej58Mzqu3Rnlm+6RfPvfzE+23xMCMY2xOCLXv2JZOOp9qZqjtcbnnnkHlft/OnUFR4UG1tMjuh7TD/Ci714HuYyGYlpTWHzCVSteMhCFbL4fmWhth0A1evfD9Rtuq2ErGyxIMPiEPe+xDIC5ljR82I8GIp0FpKUEoX3OaMFvaeM8wG68RWVzjIetyJFHn3p77EalX2U4UWKljriXDHrM5KIA= node_js: -- 5.0.0 -before_install: -- npm install -g gulp +- 6.0.0 branches: only: - master +cache: + directories: + - node_modules + - app/node_modules + - "$HOME/.electron" + - "$HOME/.npm" +before_install: +- git clone https://github.com/creationix/nvm.git ~/.nvm +- source ~/.nvm/nvm.sh +- nvm install $NODE_VERSION +- nvm use --delete-prefix $NODE_VERSION +install: +- npm prune +- npm install +script: +- npm test +- npm run webpack notifications: email: - - kimorkim@gmail.com -before_deploy: gulp deploy -deploy: - provider: releases - api_key: - secure: H+Qtnvo8ZsQ5AwytSqVmZbxGYG0ncLFT35i3XKvySwTqlnsaLoZ7HxSti9PireNzJ3y3NT8ePlv1OlLfSFJ7jU7GLkHq+v9O/1duBc5RFtYliwIjlVjotkhS8vX6HlMakL4xeaeU72E6DPPZN36MdMwrDEgZUN3TGEFNiFK50/t8CYPb1avvSwfxbTK/xgtm0u3IfSydOhpq0DrrwhbZSk/krgvfejil3CZ377Z892Hagcsks7GHvz7yVhW5z6kFyW7Th4y6mW/v21OgGKdxtCJCpHXT3JetOlpbEtqtxIZGogNOyXtzCHFvrbZmw3TPH4/0/HMkIy4o2o9rcay23W6YvoBELQDZMVTgf/6yyxt19eMFUXuofNO3vSYu9ALRwoX9jIE7JqoA9g4BZ4vGXf1ucG/Ak6gP/C7+kXYTgTL254RuTQeRq7fwg4ootKINm7DjPwAXUs+Kpb0XtnPej58Mzqu3Rnlm+6RfPvfzE+23xMCMY2xOCLXv2JZOOp9qZqjtcbnnnkHlft/OnUFR4UG1tMjuh7TD/Ci714HuYyGYlpTWHzCVSteMhCFbL4fmWhth0A1evfD9Rtuq2ErGyxIMPiEPe+xDIC5ljR82I8GIp0FpKUEoX3OaMFvaeM8wG68RWVzjIetyJFHn3p77EalX2U4UWKljriXDHrM5KIA= - file: - - "dist/js/sdm.min.js" - - "dist/js/sdm.min.js.map" - skip_cleanup: true - on: - tags: true - all_branches: true \ No newline at end of file + - kimorkim@gmail.com \ No newline at end of file diff --git a/dist/sudokuMaker.js b/dist/sudokuMaker.js index 294ac12..266f53b 100644 --- a/dist/sudokuMaker.js +++ b/dist/sudokuMaker.js @@ -173,7 +173,7 @@ return /******/ (function(modules) { // webpackBootstrap key: 'gameDataCheck', value: function gameDataCheck(gameData) { var checkData = { - state: _Constants.PlayTypes.COMPLETE, + state: _Constants.PlayTypes.SUCCESS, box: {}, rows: {}, cols: {} @@ -318,6 +318,8 @@ return /******/ (function(modules) { // webpackBootstrap checkData.state = _Constants.PlayTypes.FAIL; } else if (isSolving) { checkData.state = _Constants.PlayTypes.SOLVING; + } else { + _Constants.PlayTypes.state = _Constants.PlayTypes.SUCCESS; } return checkData; @@ -522,4 +524,4 @@ return /******/ (function(modules) { // webpackBootstrap /***/ } /******/ ]) }); -; +; \ No newline at end of file diff --git a/dist/sudokuMaker.min.js b/dist/sudokuMaker.min.js index 8e19c53..0ebb765 100644 --- a/dist/sudokuMaker.min.js +++ b/dist/sudokuMaker.min.js @@ -1 +1 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.sudokuMaker=e():t.sudokuMaker=e()}(this,function(){return function(t){function e(r){if(o[r])return o[r].exports;var n=o[r]={exports:{},id:r,loaded:!1};return t[r].call(n.exports,n,n.exports,e),n.loaded=!0,n.exports}var o={};return e.m=t,e.c=o,e.p="/",e(0)}([function(t,e,o){t.exports=o(1)},function(t,e,o){var r,n,a,r,n,a;!function(f,i){n=[t,e,o(3),o(2)],r=i,a="function"==typeof r?r.apply(e,n):r,!(void 0!==a&&(t.exports=a))}(this,function(t,e){!function(f,i){n=[t,e,o(3),o(2)],r=i,a="function"==typeof r?r.apply(e,n):r,!(void 0!==a&&(t.exports=a))}(this,function(t,e,o,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(){for(var t=[],e=[1,2,3,4,5,6,7,8,9],o=0;o<3;o++)for(var r=0;r<3;r++)t[r]||(t[r]=[]),t[r][o]=[],t[r][o]=e.splice(Math.floor(Math.random()*e.length),1)[0];return t}function f(t,e){for(var o=[],r=0;r<3;r++)o=o.concat(t[r]);return o[e]}function i(t,e){for(var o=[[0,0,0],[0,0,0],[0,0,0]],r=0;r<3;r++)for(var n=0;n<3;n++)o[r][n]=f(t,e[r][n]);return o}function u(t){return JSON.parse(JSON.stringify(t))}function c(t){var e=Math.floor((t-1)/9),o=Math.floor(t%9/3),r=Math.floor(t%9%3);return{i:e,j:o,k:r}}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var o=0;o=0&&t){n=!0;var c=""+r+f+i;e.box[c]={_i:r,_j:f,_k:i};var s=Math.floor(u/3),p=u%3,l=""+r+s+p;e.box[l]={_i:r,_j:s,_k:p}}else t||(o=!0);a.push(t)})})},f=0;f<9;f++)a(f);for(var i=function(r){for(var a=function(a){var f=[],i=t[r][a].concat(t[r+1][a],t[r+2][a]);i.forEach(function(t,i){var u=r+Math.floor(i/3),c=i%3,s=f.indexOf(t);if(s>=0&&t){n=!0;var p=""+u+a+c;e.rows[p]={_i:u,_j:a,_k:c};var l=r+Math.floor(s/3),v=s%3,h=""+l+a+v;e.rows[h]={_i:l,_j:a,_k:v}}else t||(o=!0);f.push(t)})},f=0;f<3;f++)a(f)},u=0;u<9;u+=3)i(u);for(var c=function(r){for(var a=function(a){var f=[],i=0,u=[];u.push(t[r][i][a]),u.push(t[r][i+1][a]),u.push(t[r][i+2][a]),u.push(t[r+3][i][a]),u.push(t[r+3][i+1][a]),u.push(t[r+3][i+2][a]),u.push(t[r+6][i][a]),u.push(t[r+6][i+1][a]),u.push(t[r+6][i+2][a]),u.forEach(function(t,i){var u=3*Math.floor(i/3)+r,c=i%3,s=f.indexOf(t);if(s>=0&&t){n=!0;var p=""+u+c+a;e.cols[p]={_i:u,_j:c,_k:a};var l=3*Math.floor(s/3)+r,v=s%3,h=""+l+v+a;e.cols[h]={_i:l,_j:v,_k:a}}else t||(o=!0);f.push(t)})},f=0;f<3;f++)a(f)},s=0;s<3;s++)c(s);return n?e.state=r.PlayTypes.FAIL:o&&(e.state=r.PlayTypes.SOLVING),e}}]),t}();e["default"]=new p,t.exports=e["default"]})})},function(t,e,o){var r,n,a,r,n,a;!function(o,f){n=[e],r=f,a="function"==typeof r?r.apply(e,n):r,!(void 0!==a&&(t.exports=a))}(this,function(e){!function(o,f){n=[e],r=f,a="function"==typeof r?r.apply(e,n):r,!(void 0!==a&&(t.exports=a))}(this,function(t){"use strict";"use strict;";Object.defineProperty(t,"__esModule",{value:!0});var e={SUCCESS:"SUCCESS",FAIL:"FAIL",SOLVING:"SOLVING"},o={RANDOM:"RANDOM"};t.PlayTypes=e,t.CreateTypes=o})})},function(t,e,o){var r,n,a,r,n,a;!function(o,f){n=[e],r=f,a="function"==typeof r?r.apply(e,n):r,!(void 0!==a&&(t.exports=a))}(this,function(e){!function(o,f){n=[e],r=f,a="function"==typeof r?r.apply(e,n):r,!(void 0!==a&&(t.exports=a))}(this,function(t){"use strict";"use strict;";Object.defineProperty(t,"__esModule",{value:!0});var e={};e.A=[[0,1,2],[3,4,5],[6,7,8]],e.B=[[1,2,0],[4,5,3],[7,8,6]],e.C=[[2,0,1],[5,3,4],[8,6,7]],e.D=[[3,4,5],[6,7,8],[0,1,2]],e.E=[[4,5,3],[7,8,6],[1,2,0]],e.F=[[5,3,4],[8,6,7],[2,0,1]],e.G=[[6,7,8],[0,1,2],[3,4,5]],e.H=[[7,8,6],[1,2,0],[4,5,3]],e.I=[[8,6,7],[2,0,1],[5,3,4]],e.J=[[8,7,6],[2,1,0],[5,4,3]],e.K=[[4,3,5],[7,6,8],[1,0,2]],e.L=[[6,8,7],[0,2,1],[3,5,4]],e.M=[[4,8,1],[7,5,6],[2,0,3]],e.N=[[8,2,4],[5,6,7],[1,3,0]],e.O=[[6,5,8],[0,7,2],[3,4,1]],e.P=[[7,2,6],[4,3,0],[8,1,5]],e.Q=[[5,6,7],[1,0,3],[2,8,4]],e.R=[[7,4,3],[6,1,8],[0,5,2]],e.S=[[3,0,5],[2,8,1],[4,6,7]],e.T=[[1,3,0],[8,2,4],[5,7,6]],e.U=[[4,2,0],[5,3,1],[8,6,7]],e.V=[[7,5,4],[1,8,3],[2,0,6]],e.W=[[8,5,3],[7,0,6],[2,4,1]],e.X=[[6,1,7],[0,2,8],[4,3,5]],e.Y=[[1,8,2],[5,6,0],[3,7,4]],e.Z=[[6,4,7],[2,1,8],[0,3,5]],e.AA=[[5,8,3],[7,6,4],[1,2,0]],e.AB=[[3,0,6],[4,7,2],[8,5,1]];var o=[];o[0]=["A","D","G","B","E","H","C","F","I"],o[1]=["A","G","D","B","H","E","C","I","F"],o[2]=["A","G","D","C","I","F","B","H","E"],o[3]=["A","J","F","I","K","A","B","L","E"],o[4]=["A","G","D","F","C","I","E","B","H"],o[5]=["A","O","R","M","P","S","N","Q","T"],o[6]=["A","R","O","M","S","P","N","T","Q"],o[7]=["A","R","O","N","T","Q","M","S","P"],o[8]=["A","O","R","N","Q","T","M","P","S"],o[9]=["A","W","Z","U","X","AA","V","Y","AB"],o[10]=["A","Z","W","U","AA","X","V","AB","Y"],o[11]=["A","Z","W","V","AB","Y","U","AA","X"],o[12]=["A","W","Z","V","Y","AB","U","X","AA"],t.TilePattern=e,t.GamePattern=o})})}])}); +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.sudokuMaker=e():t.sudokuMaker=e()}(this,function(){return function(t){function e(r){if(o[r])return o[r].exports;var n=o[r]={exports:{},id:r,loaded:!1};return t[r].call(n.exports,n,n.exports,e),n.loaded=!0,n.exports}var o={};return e.m=t,e.c=o,e.p="/",e(0)}([function(t,e,o){t.exports=o(1)},function(t,e,o){var r,n,a,r,n,a;!function(f,i){n=[t,e,o(3),o(2)],r=i,a="function"==typeof r?r.apply(e,n):r,!(void 0!==a&&(t.exports=a))}(this,function(t,e){!function(f,i){n=[t,e,o(3),o(2)],r=i,a="function"==typeof r?r.apply(e,n):r,!(void 0!==a&&(t.exports=a))}(this,function(t,e,o,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(){for(var t=[],e=[1,2,3,4,5,6,7,8,9],o=0;o<3;o++)for(var r=0;r<3;r++)t[r]||(t[r]=[]),t[r][o]=[],t[r][o]=e.splice(Math.floor(Math.random()*e.length),1)[0];return t}function f(t,e){for(var o=[],r=0;r<3;r++)o=o.concat(t[r]);return o[e]}function i(t,e){for(var o=[[0,0,0],[0,0,0],[0,0,0]],r=0;r<3;r++)for(var n=0;n<3;n++)o[r][n]=f(t,e[r][n]);return o}function u(t){return JSON.parse(JSON.stringify(t))}function c(t){var e=Math.floor((t-1)/9),o=Math.floor(t%9/3),r=Math.floor(t%9%3);return{i:e,j:o,k:r}}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var o=0;o=0&&t){n=!0;var c=""+r+f+i;e.box[c]={_i:r,_j:f,_k:i};var s=Math.floor(u/3),p=u%3,l=""+r+s+p;e.box[l]={_i:r,_j:s,_k:p}}else t||(o=!0);a.push(t)})})},f=0;f<9;f++)a(f);for(var i=function(r){for(var a=function(a){var f=[],i=t[r][a].concat(t[r+1][a],t[r+2][a]);i.forEach(function(t,i){var u=r+Math.floor(i/3),c=i%3,s=f.indexOf(t);if(s>=0&&t){n=!0;var p=""+u+a+c;e.rows[p]={_i:u,_j:a,_k:c};var l=r+Math.floor(s/3),v=s%3,y=""+l+a+v;e.rows[y]={_i:l,_j:a,_k:v}}else t||(o=!0);f.push(t)})},f=0;f<3;f++)a(f)},u=0;u<9;u+=3)i(u);for(var c=function(r){for(var a=function(a){var f=[],i=0,u=[];u.push(t[r][i][a]),u.push(t[r][i+1][a]),u.push(t[r][i+2][a]),u.push(t[r+3][i][a]),u.push(t[r+3][i+1][a]),u.push(t[r+3][i+2][a]),u.push(t[r+6][i][a]),u.push(t[r+6][i+1][a]),u.push(t[r+6][i+2][a]),u.forEach(function(t,i){var u=3*Math.floor(i/3)+r,c=i%3,s=f.indexOf(t);if(s>=0&&t){n=!0;var p=""+u+c+a;e.cols[p]={_i:u,_j:c,_k:a};var l=3*Math.floor(s/3)+r,v=s%3,y=""+l+v+a;e.cols[y]={_i:l,_j:v,_k:a}}else t||(o=!0);f.push(t)})},f=0;f<3;f++)a(f)},s=0;s<3;s++)c(s);return n?e.state=r.PlayTypes.FAIL:o?e.state=r.PlayTypes.SOLVING:r.PlayTypes.state=r.PlayTypes.SUCCESS,e}}]),t}();e["default"]=new p,t.exports=e["default"]})})},function(t,e,o){var r,n,a,r,n,a;!function(o,f){n=[e],r=f,a="function"==typeof r?r.apply(e,n):r,!(void 0!==a&&(t.exports=a))}(this,function(e){!function(o,f){n=[e],r=f,a="function"==typeof r?r.apply(e,n):r,!(void 0!==a&&(t.exports=a))}(this,function(t){"use strict";"use strict;";Object.defineProperty(t,"__esModule",{value:!0});var e={SUCCESS:"SUCCESS",FAIL:"FAIL",SOLVING:"SOLVING"},o={RANDOM:"RANDOM"};t.PlayTypes=e,t.CreateTypes=o})})},function(t,e,o){var r,n,a,r,n,a;!function(o,f){n=[e],r=f,a="function"==typeof r?r.apply(e,n):r,!(void 0!==a&&(t.exports=a))}(this,function(e){!function(o,f){n=[e],r=f,a="function"==typeof r?r.apply(e,n):r,!(void 0!==a&&(t.exports=a))}(this,function(t){"use strict";"use strict;";Object.defineProperty(t,"__esModule",{value:!0});var e={};e.A=[[0,1,2],[3,4,5],[6,7,8]],e.B=[[1,2,0],[4,5,3],[7,8,6]],e.C=[[2,0,1],[5,3,4],[8,6,7]],e.D=[[3,4,5],[6,7,8],[0,1,2]],e.E=[[4,5,3],[7,8,6],[1,2,0]],e.F=[[5,3,4],[8,6,7],[2,0,1]],e.G=[[6,7,8],[0,1,2],[3,4,5]],e.H=[[7,8,6],[1,2,0],[4,5,3]],e.I=[[8,6,7],[2,0,1],[5,3,4]],e.J=[[8,7,6],[2,1,0],[5,4,3]],e.K=[[4,3,5],[7,6,8],[1,0,2]],e.L=[[6,8,7],[0,2,1],[3,5,4]],e.M=[[4,8,1],[7,5,6],[2,0,3]],e.N=[[8,2,4],[5,6,7],[1,3,0]],e.O=[[6,5,8],[0,7,2],[3,4,1]],e.P=[[7,2,6],[4,3,0],[8,1,5]],e.Q=[[5,6,7],[1,0,3],[2,8,4]],e.R=[[7,4,3],[6,1,8],[0,5,2]],e.S=[[3,0,5],[2,8,1],[4,6,7]],e.T=[[1,3,0],[8,2,4],[5,7,6]],e.U=[[4,2,0],[5,3,1],[8,6,7]],e.V=[[7,5,4],[1,8,3],[2,0,6]],e.W=[[8,5,3],[7,0,6],[2,4,1]],e.X=[[6,1,7],[0,2,8],[4,3,5]],e.Y=[[1,8,2],[5,6,0],[3,7,4]],e.Z=[[6,4,7],[2,1,8],[0,3,5]],e.AA=[[5,8,3],[7,6,4],[1,2,0]],e.AB=[[3,0,6],[4,7,2],[8,5,1]];var o=[];o[0]=["A","D","G","B","E","H","C","F","I"],o[1]=["A","G","D","B","H","E","C","I","F"],o[2]=["A","G","D","C","I","F","B","H","E"],o[3]=["A","J","F","I","K","A","B","L","E"],o[4]=["A","G","D","F","C","I","E","B","H"],o[5]=["A","O","R","M","P","S","N","Q","T"],o[6]=["A","R","O","M","S","P","N","T","Q"],o[7]=["A","R","O","N","T","Q","M","S","P"],o[8]=["A","O","R","N","Q","T","M","P","S"],o[9]=["A","W","Z","U","X","AA","V","Y","AB"],o[10]=["A","Z","W","U","AA","X","V","AB","Y"],o[11]=["A","Z","W","V","AB","Y","U","AA","X"],o[12]=["A","W","Z","V","Y","AB","U","X","AA"],t.TilePattern=e,t.GamePattern=o})})}])}); \ No newline at end of file diff --git a/package.json b/package.json index 9bc90d0..5a13e87 100644 --- a/package.json +++ b/package.json @@ -7,10 +7,18 @@ "example": "example" }, "scripts": { - "test": "echo 0", + "test": "ava", "webpack": "webpack --display-error-details;", "watch": "webpack --watch --display-error-details;" }, + "ava": { + "files": [ + "test/*.js" + ], + "failFast": true, + "tap": true, + "babel": "inherit" + }, "repository": { "type": "git", "url": "git+https://kimorkim@github.com/kimorkim/sudokuMaker.git" @@ -25,6 +33,7 @@ }, "homepage": "https://github.com/kimorkim/sudokuMaker#readme", "devDependencies": { + "ava": "^0.16.0", "babel": "^6.5.2", "babel-core": "^6.14.0", "babel-loader": "^6.2.5", @@ -32,6 +41,7 @@ "babel-plugin-transform-es2015-modules-umd": "^6.12.0", "babel-preset-es2015": "^6.14.0", "babel-preset-stage-2": "^6.13.0", + "babel-register": "^6.14.0", "babel-runtime": "^6.11.6", "core-js": "^2.4.1", "webpack": "^1.13.2" diff --git a/src/index.js b/src/index.js index a3a5cda..c6a9226 100644 --- a/src/index.js +++ b/src/index.js @@ -53,7 +53,7 @@ class sudokuMaker { gameDataCheck(gameData) { const checkData = { - state: PlayTypes.COMPLETE, + state: PlayTypes.SUCCESS, box: {}, rows: {}, cols: {} @@ -178,6 +178,8 @@ class sudokuMaker { checkData.state = PlayTypes.FAIL; } else if(isSolving) { checkData.state = PlayTypes.SOLVING; + } else { + PlayTypes.state = PlayTypes.SUCCESS; } return checkData; diff --git a/test/index.js b/test/index.js new file mode 100644 index 0000000..47c3554 --- /dev/null +++ b/test/index.js @@ -0,0 +1,54 @@ +import test from 'ava'; +import sudokuMaker from '../dist/sudokuMaker'; + +const testData = {"inCorrectData":[[[4,8,4],[6,5,1],[2,7,9]],[[2,7,9],[3,8,4],[6,5,1]],[[6,5,1],[2,7,9],[3,8,4]],[[4,3,8],[1,6,5],[9,2,7]],[[9,2,7],[4,3,8],[1,6,5]],[[1,6,5],[9,2,7],[4,3,8]],[[8,4,3],[5,1,6],[7,9,2]],[[7,9,2],[8,4,3],[5,1,6]],[[5,1,6],[7,9,2],[8,4,3]]]}; +const failCaseData = {"state":"FAIL","box":{"002":{"_i":0,"_j":0,"_k":2},"000":{"_i":0,"_j":0,"_k":0}},"rows":{"002":{"_i":0,"_j":0,"_k":2},"000":{"_i":0,"_j":0,"_k":0}},"cols":{"300":{"_i":3,"_j":0,"_k":0},"000":{"_i":0,"_j":0,"_k":0}}}; + +test.before(t => { + if(!('createGame' in sudokuMaker)) { + t.fail('sudokuMaker not have createGame'); + } + Object.assign(testData, sudokuMaker.createGame()); +}) + + +test('Get GameData', t => { + const gameData = sudokuMaker.createGame(); + + if(gameData && 'correctData' in gameData && 'data' in gameData) { + t.pass('sudokuMaker Complete Game Create'); + } else { + t.fail('Do not Create Game'); + } +}); + +test('GameCheck Test', t => { + t.plan(3); + + if(!('gameDataCheck' in sudokuMaker)) { + t.fail('sudokuMaker not have GameData Check'); + } + + const failCase = sudokuMaker.gameDataCheck(testData.inCorrectData); + const solvingCase = sudokuMaker.gameDataCheck(testData.data); + const successCase = sudokuMaker.gameDataCheck(testData.correctData); + + if(successCase && successCase.state === 'SUCCESS') { + t.pass('SUCCESS CHECK COMPLETE'); + } else { + t.fail('SUCCESS CHECK FAIL'); + } + + if(solvingCase && solvingCase.state === 'SOLVING') { + t.pass('SOLVING CHECK COMPLETE'); + } else { + t.fail('SOLVING CHECK FAIL'); + } + + if(failCase && failCase.state === 'FAIL') { + t.deepEqual(failCase, failCaseData, 'FAILCASE CHECK COMPLETE') + } else { + t.fail('FAILCASE CHECK FAIL'); + } + +}); \ No newline at end of file