title: Use resources in unit tests with Swift Package Manager
body: <p>I'm trying to use a resource file in unit tests and access it with <code>Bundle.path</code>, but it returns nil.</p>
  
  <p>This call in MyProjectTests.swift returns nil:</p>
  
  <pre><code>Bundle(for: type(of: self)).path(forResource: "TestAudio", ofType: "m4a")
  </code></pre>
  
  <p>Here is my project hierarchy. I also tried moving <code>TestAudio.m4a</code> to a <code>Resources</code> folder:</p>
  
  <pre><code>├── Package.swift
  ├── Sources
  │   └── MyProject
  │       ├── ...
  └── Tests
      └── MyProjectTests
          ├── MyProjectTests.swift
          └── TestAudio.m4a
  </code></pre>
  
  <p>Here is my package description:</p>
  
  <pre><code>// swift-tools-version:4.0
  
  import PackageDescription
  
  let package = Package(
      name: "MyProject",
      products: [
          .library(
              name: "MyProject",
              targets: ["MyProject"])
      ],
      targets: [
          .target(
              name: "MyProject",
              dependencies: []
          ),
          .testTarget(
              name: "MyProjectTests",
              dependencies: ["MyProject"]
          ),
      ]
  )
  </code></pre>
  
  <p>I am using Swift 4 and the Swift Package Manager Description API version 4.</p>