replaced not.toBe(undefined) with toBeDefined() in tests
refactored require config and dependencies so require can be used for source files and tests in the same way