├── .gitignore ├── .prettierrc ├── LICENSE ├── README.md ├── chapter_01-the_basics_of_unit_testing └── SimpleParser │ ├── InvalidOperationError.js │ ├── simpleParser.homemadetest.js │ └── simpleParser.js ├── chapter_02-a-first-unit-test ├── LogAn │ ├── ArgumentError.js │ ├── logAnalyzer.js │ └── logAnalyzer.test.js └── MemCalculator │ ├── memCalculator.js │ └── memCalculator.test.js ├── chapter_03-using-stubs-to-break-dependencies └── LogAn │ ├── ArgumentError.js │ ├── alwaysValidFakeExtensionManager.js │ ├── extensionManager.js │ ├── fakeExtensionManager.js │ ├── fileExtensionManager.js │ ├── fileNameExtensions.config.json │ ├── logAnalyzer.class.js │ ├── logAnalyzer.js │ ├── logAnalyzer.test.js │ └── testableLogAnalyzer.class.js ├── chapter_04-interaction-testing-using-mock-objects └── LogAn │ ├── errors │ └── ArgumentError.js │ ├── extensionManager.js │ ├── fakes │ ├── alwaysValidFakeExtensionManager.js │ ├── fakeEmailService.js │ ├── fakeExtensionManager.js │ ├── fakeThrowsErrorWebService.js │ └── fakeWebService.js │ ├── fileExtensionManager.js │ ├── fileNameExtensions.config.json │ ├── logAnalyzer.class.js │ ├── logAnalyzer.js │ ├── logAnalyzer.test.js │ ├── logAnalyzer2.js │ ├── logAnalyzer2.test.js │ ├── testableLogAnalyzer.class.js │ └── webService.js ├── chapter_05-isolation-frameworks ├── errors │ └── ArgumentError.js ├── fakes │ └── fakeWebService.js ├── logAnalyzer.js └── logAnalyzer.test.js ├── chapter_07-test-hierarchies-and-organization └── abstractTestInfrastructureClassPattern │ ├── configurationManager.js │ ├── configurationManager.test.js │ ├── logAnalyzer.js │ ├── logAnalyzer.test.js │ ├── loggingFacility.js │ └── testsUtils │ └── baseTests.js ├── loggerWebService ├── index.js └── server.js └── package.json /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devcorpio/the-art-of-unit-testing/HEAD/.prettierrc -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devcorpio/the-art-of-unit-testing/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devcorpio/the-art-of-unit-testing/HEAD/README.md -------------------------------------------------------------------------------- /chapter_01-the_basics_of_unit_testing/SimpleParser/InvalidOperationError.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devcorpio/the-art-of-unit-testing/HEAD/chapter_01-the_basics_of_unit_testing/SimpleParser/InvalidOperationError.js -------------------------------------------------------------------------------- /chapter_01-the_basics_of_unit_testing/SimpleParser/simpleParser.homemadetest.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devcorpio/the-art-of-unit-testing/HEAD/chapter_01-the_basics_of_unit_testing/SimpleParser/simpleParser.homemadetest.js -------------------------------------------------------------------------------- /chapter_01-the_basics_of_unit_testing/SimpleParser/simpleParser.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devcorpio/the-art-of-unit-testing/HEAD/chapter_01-the_basics_of_unit_testing/SimpleParser/simpleParser.js -------------------------------------------------------------------------------- /chapter_02-a-first-unit-test/LogAn/ArgumentError.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devcorpio/the-art-of-unit-testing/HEAD/chapter_02-a-first-unit-test/LogAn/ArgumentError.js -------------------------------------------------------------------------------- /chapter_02-a-first-unit-test/LogAn/logAnalyzer.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devcorpio/the-art-of-unit-testing/HEAD/chapter_02-a-first-unit-test/LogAn/logAnalyzer.js -------------------------------------------------------------------------------- /chapter_02-a-first-unit-test/LogAn/logAnalyzer.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devcorpio/the-art-of-unit-testing/HEAD/chapter_02-a-first-unit-test/LogAn/logAnalyzer.test.js -------------------------------------------------------------------------------- /chapter_02-a-first-unit-test/MemCalculator/memCalculator.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devcorpio/the-art-of-unit-testing/HEAD/chapter_02-a-first-unit-test/MemCalculator/memCalculator.js -------------------------------------------------------------------------------- /chapter_02-a-first-unit-test/MemCalculator/memCalculator.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devcorpio/the-art-of-unit-testing/HEAD/chapter_02-a-first-unit-test/MemCalculator/memCalculator.test.js -------------------------------------------------------------------------------- /chapter_03-using-stubs-to-break-dependencies/LogAn/ArgumentError.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devcorpio/the-art-of-unit-testing/HEAD/chapter_03-using-stubs-to-break-dependencies/LogAn/ArgumentError.js -------------------------------------------------------------------------------- /chapter_03-using-stubs-to-break-dependencies/LogAn/alwaysValidFakeExtensionManager.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devcorpio/the-art-of-unit-testing/HEAD/chapter_03-using-stubs-to-break-dependencies/LogAn/alwaysValidFakeExtensionManager.js -------------------------------------------------------------------------------- /chapter_03-using-stubs-to-break-dependencies/LogAn/extensionManager.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devcorpio/the-art-of-unit-testing/HEAD/chapter_03-using-stubs-to-break-dependencies/LogAn/extensionManager.js -------------------------------------------------------------------------------- /chapter_03-using-stubs-to-break-dependencies/LogAn/fakeExtensionManager.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devcorpio/the-art-of-unit-testing/HEAD/chapter_03-using-stubs-to-break-dependencies/LogAn/fakeExtensionManager.js -------------------------------------------------------------------------------- /chapter_03-using-stubs-to-break-dependencies/LogAn/fileExtensionManager.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devcorpio/the-art-of-unit-testing/HEAD/chapter_03-using-stubs-to-break-dependencies/LogAn/fileExtensionManager.js -------------------------------------------------------------------------------- /chapter_03-using-stubs-to-break-dependencies/LogAn/fileNameExtensions.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "extensions": ["slf", "sql"] 3 | } 4 | -------------------------------------------------------------------------------- /chapter_03-using-stubs-to-break-dependencies/LogAn/logAnalyzer.class.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devcorpio/the-art-of-unit-testing/HEAD/chapter_03-using-stubs-to-break-dependencies/LogAn/logAnalyzer.class.js -------------------------------------------------------------------------------- /chapter_03-using-stubs-to-break-dependencies/LogAn/logAnalyzer.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devcorpio/the-art-of-unit-testing/HEAD/chapter_03-using-stubs-to-break-dependencies/LogAn/logAnalyzer.js -------------------------------------------------------------------------------- /chapter_03-using-stubs-to-break-dependencies/LogAn/logAnalyzer.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devcorpio/the-art-of-unit-testing/HEAD/chapter_03-using-stubs-to-break-dependencies/LogAn/logAnalyzer.test.js -------------------------------------------------------------------------------- /chapter_03-using-stubs-to-break-dependencies/LogAn/testableLogAnalyzer.class.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devcorpio/the-art-of-unit-testing/HEAD/chapter_03-using-stubs-to-break-dependencies/LogAn/testableLogAnalyzer.class.js -------------------------------------------------------------------------------- /chapter_04-interaction-testing-using-mock-objects/LogAn/errors/ArgumentError.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devcorpio/the-art-of-unit-testing/HEAD/chapter_04-interaction-testing-using-mock-objects/LogAn/errors/ArgumentError.js -------------------------------------------------------------------------------- /chapter_04-interaction-testing-using-mock-objects/LogAn/extensionManager.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devcorpio/the-art-of-unit-testing/HEAD/chapter_04-interaction-testing-using-mock-objects/LogAn/extensionManager.js -------------------------------------------------------------------------------- /chapter_04-interaction-testing-using-mock-objects/LogAn/fakes/alwaysValidFakeExtensionManager.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devcorpio/the-art-of-unit-testing/HEAD/chapter_04-interaction-testing-using-mock-objects/LogAn/fakes/alwaysValidFakeExtensionManager.js -------------------------------------------------------------------------------- /chapter_04-interaction-testing-using-mock-objects/LogAn/fakes/fakeEmailService.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devcorpio/the-art-of-unit-testing/HEAD/chapter_04-interaction-testing-using-mock-objects/LogAn/fakes/fakeEmailService.js -------------------------------------------------------------------------------- /chapter_04-interaction-testing-using-mock-objects/LogAn/fakes/fakeExtensionManager.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devcorpio/the-art-of-unit-testing/HEAD/chapter_04-interaction-testing-using-mock-objects/LogAn/fakes/fakeExtensionManager.js -------------------------------------------------------------------------------- /chapter_04-interaction-testing-using-mock-objects/LogAn/fakes/fakeThrowsErrorWebService.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devcorpio/the-art-of-unit-testing/HEAD/chapter_04-interaction-testing-using-mock-objects/LogAn/fakes/fakeThrowsErrorWebService.js -------------------------------------------------------------------------------- /chapter_04-interaction-testing-using-mock-objects/LogAn/fakes/fakeWebService.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devcorpio/the-art-of-unit-testing/HEAD/chapter_04-interaction-testing-using-mock-objects/LogAn/fakes/fakeWebService.js -------------------------------------------------------------------------------- /chapter_04-interaction-testing-using-mock-objects/LogAn/fileExtensionManager.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devcorpio/the-art-of-unit-testing/HEAD/chapter_04-interaction-testing-using-mock-objects/LogAn/fileExtensionManager.js -------------------------------------------------------------------------------- /chapter_04-interaction-testing-using-mock-objects/LogAn/fileNameExtensions.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "extensions": ["slf", "sql"] 3 | } 4 | -------------------------------------------------------------------------------- /chapter_04-interaction-testing-using-mock-objects/LogAn/logAnalyzer.class.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devcorpio/the-art-of-unit-testing/HEAD/chapter_04-interaction-testing-using-mock-objects/LogAn/logAnalyzer.class.js -------------------------------------------------------------------------------- /chapter_04-interaction-testing-using-mock-objects/LogAn/logAnalyzer.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devcorpio/the-art-of-unit-testing/HEAD/chapter_04-interaction-testing-using-mock-objects/LogAn/logAnalyzer.js -------------------------------------------------------------------------------- /chapter_04-interaction-testing-using-mock-objects/LogAn/logAnalyzer.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devcorpio/the-art-of-unit-testing/HEAD/chapter_04-interaction-testing-using-mock-objects/LogAn/logAnalyzer.test.js -------------------------------------------------------------------------------- /chapter_04-interaction-testing-using-mock-objects/LogAn/logAnalyzer2.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devcorpio/the-art-of-unit-testing/HEAD/chapter_04-interaction-testing-using-mock-objects/LogAn/logAnalyzer2.js -------------------------------------------------------------------------------- /chapter_04-interaction-testing-using-mock-objects/LogAn/logAnalyzer2.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devcorpio/the-art-of-unit-testing/HEAD/chapter_04-interaction-testing-using-mock-objects/LogAn/logAnalyzer2.test.js -------------------------------------------------------------------------------- /chapter_04-interaction-testing-using-mock-objects/LogAn/testableLogAnalyzer.class.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devcorpio/the-art-of-unit-testing/HEAD/chapter_04-interaction-testing-using-mock-objects/LogAn/testableLogAnalyzer.class.js -------------------------------------------------------------------------------- /chapter_04-interaction-testing-using-mock-objects/LogAn/webService.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devcorpio/the-art-of-unit-testing/HEAD/chapter_04-interaction-testing-using-mock-objects/LogAn/webService.js -------------------------------------------------------------------------------- /chapter_05-isolation-frameworks/errors/ArgumentError.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devcorpio/the-art-of-unit-testing/HEAD/chapter_05-isolation-frameworks/errors/ArgumentError.js -------------------------------------------------------------------------------- /chapter_05-isolation-frameworks/fakes/fakeWebService.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devcorpio/the-art-of-unit-testing/HEAD/chapter_05-isolation-frameworks/fakes/fakeWebService.js -------------------------------------------------------------------------------- /chapter_05-isolation-frameworks/logAnalyzer.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devcorpio/the-art-of-unit-testing/HEAD/chapter_05-isolation-frameworks/logAnalyzer.js -------------------------------------------------------------------------------- /chapter_05-isolation-frameworks/logAnalyzer.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devcorpio/the-art-of-unit-testing/HEAD/chapter_05-isolation-frameworks/logAnalyzer.test.js -------------------------------------------------------------------------------- /chapter_07-test-hierarchies-and-organization/abstractTestInfrastructureClassPattern/configurationManager.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devcorpio/the-art-of-unit-testing/HEAD/chapter_07-test-hierarchies-and-organization/abstractTestInfrastructureClassPattern/configurationManager.js -------------------------------------------------------------------------------- /chapter_07-test-hierarchies-and-organization/abstractTestInfrastructureClassPattern/configurationManager.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devcorpio/the-art-of-unit-testing/HEAD/chapter_07-test-hierarchies-and-organization/abstractTestInfrastructureClassPattern/configurationManager.test.js -------------------------------------------------------------------------------- /chapter_07-test-hierarchies-and-organization/abstractTestInfrastructureClassPattern/logAnalyzer.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devcorpio/the-art-of-unit-testing/HEAD/chapter_07-test-hierarchies-and-organization/abstractTestInfrastructureClassPattern/logAnalyzer.js -------------------------------------------------------------------------------- /chapter_07-test-hierarchies-and-organization/abstractTestInfrastructureClassPattern/logAnalyzer.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devcorpio/the-art-of-unit-testing/HEAD/chapter_07-test-hierarchies-and-organization/abstractTestInfrastructureClassPattern/logAnalyzer.test.js -------------------------------------------------------------------------------- /chapter_07-test-hierarchies-and-organization/abstractTestInfrastructureClassPattern/loggingFacility.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devcorpio/the-art-of-unit-testing/HEAD/chapter_07-test-hierarchies-and-organization/abstractTestInfrastructureClassPattern/loggingFacility.js -------------------------------------------------------------------------------- /chapter_07-test-hierarchies-and-organization/abstractTestInfrastructureClassPattern/testsUtils/baseTests.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devcorpio/the-art-of-unit-testing/HEAD/chapter_07-test-hierarchies-and-organization/abstractTestInfrastructureClassPattern/testsUtils/baseTests.js -------------------------------------------------------------------------------- /loggerWebService/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devcorpio/the-art-of-unit-testing/HEAD/loggerWebService/index.js -------------------------------------------------------------------------------- /loggerWebService/server.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devcorpio/the-art-of-unit-testing/HEAD/loggerWebService/server.js -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devcorpio/the-art-of-unit-testing/HEAD/package.json --------------------------------------------------------------------------------